Hacker News new | past | comments | ask | show | jobs | submit login

You wouldn't use Erlang for number crunching: you'd write some C code and communicate with that.

Same as you'd likely do with Ruby or PHP or whatever.




Okay. But let's take the example of the C++ webserver framework written by Facebook employees, which was discussed here a few days ago, [1]. This project contains lots of protocol-handling logic for HTTP/1.1 and SPDY, and beneath that TLS.

Are you saying that such projects are better written in a combination of Erlang and C/C++?

[1] https://news.ycombinator.com/item?id=8563199


Facebook has two scaling problems. One is the code, sure, but one is also the employees. They need to be able to hire and scale out their teams, and have had to do so quite quickly.

It's easier to find C++ people than it is Erlang. That is a consideration.

It's why Facebook chat was originally in Erlang, then switched to PHP. Facebook already had a lot of PHP devs, they are a lot easier to find, so rather than having to bring people up to speed, or keep a dedicated team always slightly free to be able to handle issues for chat, they rewrote it in PHP.

There is no magic bullet, not even Erlang. You have to weigh a variety of considerations, and pick appropriately based on them. But dismissing Erlang because a benchmark showed it to be slower is likely a mistake; dismissing it because you can't hire fast enough for it is a reasonable business decision.


>It's why Facebook chat was originally in Erlang, then switched to PHP. Facebook already had a lot of PHP devs...

You sure about that? I was curious and googled and from the Quora reply below it seems they switched more from Erlang to their own C++ libraries because:

"...some of the abstractions Erlang had that allowed one to transparently have a distributed system across multiple machines actually caused reliability problems -- one server in the group would fail and cause cascading issues. Secondly, we found a number of instances where Erlang wasn't scaling well to multiple cores."

http://www.quora.com/When-did-Facebook-switch-away-from-usin...


It's a matter of economics. If you have the resources to throw at a problem and write it in C++, it'll probably be faster, in the end. However, it might also take longer and be less flexible. And with networked stuff, you want to be really careful, too.

Facebook has the money to throw at something like that with no problems. Not everyone does.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: