News for hackers. Stuff that matters.
Re:Which companies are using Erlang, and why? by aloknnikhil on Sunday September 29, 2019 @11:57PM (#21111662)
WhatsApp used to use Erlang, not anymore. Facebook rewrote it completely in C++.

https://www.quora.com/When-did-Facebook-switch-away-from-usi...

Re:Which companies are using Erlang, and why? by elgenie on Monday September 30, 2019 @12:06AM (#21111703)
That system was the backend of the functionality currently known as Facebook Messenger, not WhatsApp.

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

Re:Which companies are using Erlang, and why? by dmitriid on Monday September 30, 2019 @04:41AM (#21112944)
> after freezing development of an Erlang-based messaging system...

> 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.

Re:Which companies are using Erlang, and why? by rdtsc on Tuesday October 01, 2019 @09:15AM (#21124946)
The irony is still there though
Re:Which companies are using Erlang, and why? by bdd on Monday September 30, 2019 @12:22AM (#21111757)
This isn't true at all.

Major functions of WhatsApp are implemented in Erlang and they're actively worked on.

Source: Self. Engineer at FB.

Re:Which companies are using Erlang, and why? by zerr on Monday September 30, 2019 @02:25AM (#21112255)
They (you) had to modify beam vm heavily though.
Re:Which companies are using Erlang, and why? by rapsey on Monday September 30, 2019 @03:22AM (#21112526)
At that scale you are generally modifying your entire stack or building it from scratch no mater what you are using. Also they were on a pretty old version and a number of their fixes are in Erlang itself now.

WhatsApp engineers have been quite clear that using Erlang was a great choice.

Re:Which companies are using Erlang, and why? by fouc on Monday September 30, 2019 @03:12AM (#21112473)
WhatsApp did modify Erlang but it's interesting that Elixir/Phoenix was able to hit the same scale on a single server without any such optimizations. [1]

[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.

Re:Which companies are using Erlang, and why? by hackerbabz on Monday September 30, 2019 @12:41AM (#21111823)
I thought they use Elixir (like Kotlin :: Java).
Re:Which companies are using Erlang, and why? by bdd on Monday September 30, 2019 @01:12AM (#21111954)
Not only WhatsApp but there are no files checked into any Facebook source repository with .ex or .exs suffix and looks like Elixir.
Re:Which companies are using Erlang, and why? by rdtsc on Monday September 30, 2019 @12:30AM (#21111785)
> WhatsApp used to use Erlang, not anymore. Facebook rewrote it completely in C++.

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.

Re:Which companies are using Erlang, and why? by i_feel_great on Sunday September 29, 2019 @11:59PM (#21111673)
That Quora post refers to Facebook Chat - not WhatsApp. As far as I am aware, it is still implemented in Erlang.
Re:Which companies are using Erlang, and why? by fastball on Monday September 30, 2019 @02:10AM (#21112191)
That post is about Facebook Chat, not WhatsApp.
Re:Which companies are using Erlang, and why? by mister_hn on Monday September 30, 2019 @12:47AM (#21111844)
Which is far better, IMHO
Re:Which companies are using Erlang, and why? by mister_hn on Monday September 30, 2019 @03:34AM (#21112620)
why so many negative votes?

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

Re:Which companies are using Erlang, and why? by samvher on Monday September 30, 2019 @03:52AM (#21112707)
I did not downvote but possibly because the idea of "good" and "better" programming languages does not mean much. Different tools have different purposes. If you want to write a network driver for the Linux kernel C++ is probably more suitable but if you quickly want to build a simple chat system Erlang is almost certainly going to make your life a lot easier.
Re:Which companies are using Erlang, and why? by eikenberry on Monday September 30, 2019 @03:50AM (#21112692)
I think it is because with Erlang you get Beam and it is the real treasure of the Erlang ecosystem. It not only manifest the philosophy of Erlang well but, more specifically, provides a battle tested run-time for concurrent applications that you cannot get with C++ as you have to (re-)write that concurrent run-time each time.
Re:Which companies are using Erlang, and why? by snowAbstraction on Monday September 30, 2019 @04:32AM (#21112882)
Exactly. I worked at a few smaller but established FinTech companies delivery Trading Systems to banks, hedge funds, etc that had built their own unique systems written in C++ for concurrent applications. These systems were battle tested but they were not open-sourced and anyway they could not easily be re-purposed.
Re:Which companies are using Erlang, and why? by EdwardDiego on Monday September 30, 2019 @07:47AM (#21114189)
Because subjective opinions on programming languages (C++ good, Erlang less good) are really boring without some reasoning as to why.
Re:Which companies are using Erlang, and why? by mister_hn on Monday September 30, 2019 @09:59AM (#21115402)
I explained why: better community, more battle-tested ecosystem compared to Erlang.
Re:Which companies are using Erlang, and why? by atemerev on Monday September 30, 2019 @06:03AM (#21113364)
Yes, it is battle-tested, and the testing result was the big failure: memory-related issues and vulnerabilities alone caused billions of dollars of damage, and on their way to cause more.

It is generally not a good idea at all to use C++ in network-facing applications.

Re:Which companies are using Erlang, and why? by cmrdporcupine on Monday September 30, 2019 @09:16AM (#21115001)
Google disagrees with you.
Re:Which companies are using Erlang, and why? by atemerev on Monday September 30, 2019 @10:19AM (#21115589)
The first maxim of software architecture: You Are Not Google.

(And even at Google most systems running C++ code are their core indexing and analytical systems, which are not directly related to their Internet-facing perimeter; there are some exceptions, of course).

Re:Which companies are using Erlang, and why? by cmrdporcupine on Monday September 30, 2019 @10:30AM (#21115710)
Yes yes, but I work at Google :-)

That said, looking back at previous jobs there are many places -- particularly in ad-tech stuff -- where I used Java server side that I now think C++ would have been more appropriate (or these days, Rust). I wasted a lot of hours tuning for garbage collection that I'd love to have back.

And yes, there is a crapload of stuff that is internet facing that is C++.

Re:Which companies are using Erlang, and why? by atemerev on Monday September 30, 2019 @11:01AM (#21116065)
Addendum: “Unless you are Google” :)

Well, at some point it is a matter of personal preferences and tradeoffs. One time, I used to work on a high-frequency trading system written in Java... yes, in the environment with zero tolerance to GC latency. The core system was written with “off-heap Java” style, with memory blocks preallocated... and for the periphery everybody could use regular GC-enabled Java.

Could have written everything in C++, but everybody hated C++ so much they preferred heavily modified Java compilers and environments.

Afterwards, some parts of the core were rewritten in Rust... and there were no significant performance or other gains, so it was left as is.

Re:Which companies are using Erlang, and why? by mister_hn on Monday September 30, 2019 @09:58AM (#21115391)
the device you are running to write this comment hardly disagrees