by aloknnikhil · 7y ago · 0 comments
https://www.quora.com/When-did-Facebook-switch-away-from-usi...
One might note, snidely [1], that three-four years after freezing development of an Erlang-based messaging system, starving maintenance work on that system of engineering effort, devoting massive engineering resources to a from-scratch C++ rewrite, and in the meantime blaming the language for relatively minor system design issues that could have been improved with a fraction of the effort (including, but not limited to, Erlang's ability to wrap allegedly critical C++ components) … Facebook plowed $19B into the acquisition of an Erlang-based messaging system.
[1] as a main author of the Facebook Chat version written in Erlang
> Facebook plowed $19B into the acquisition of an Erlang-based messaging system.
They didn't care what it was written in. They would've spent it on Whatsapp even it was written in PHP (like Slack). They paid for users and market penetration.
Major functions of WhatsApp are implemented in Erlang and they're actively worked on.
Source: Self. Engineer at FB.
WhatsApp engineers have been quite clear that using Erlang was a great choice.
[1] https://changelog.com/podcast/208
> I wasn’t thinking we could actually get WhatsApp-like scale, because when I read about WhatsApp, they were using FreeBSD and they forked Erlang and made some optimizations, they fine-tuned FreeBSD… So I was thinking that it was gonna be very difficult to try to replicate that kind of scale.
> So we were doing extra work, and it was really fulfilling to actually see that with minor changes in our initial best-effort approach with just a few tweaks was able to go to something that was able to get millions of connections. That was incredibly fulfilling to come full circle, and also it’s a great brag slide now, of showing that two million connections chart.
Highly doubt it. Here is Maxim Fedorov talking about scaling their cluster to 10000 nodes in 2018 https://www.youtube.com/watch?v=FJQyv26tFZ8 it would be pretty ridiculous for them to completely rewrite that in C++ one year later.
Isn't C++ a far more battle-tested language than Erlang? Hasn't C++ a far bigger community than Erlang?
To all whose concern is Memory Management, learn about C++11 (and newer standards): smart pointers and heavy use of RAII pattern work shamefully good
It is generally not a good idea at all to use C++ in network-facing applications.