5 ms·
They chose Erlang. A language built for communication and managing wire protocols at scale. Which describes WhatsApp itself. That was probably the biggest impac
by nickbauman 7y ago
They chose Erlang. A language built for communication and managing wire protocols at scale. Which describes WhatsApp itself. That was probably the biggest impact single decision for WhatsApp technically.
- ignoramous 7y agoI am not sure if WhatsApp engs chose ejabberd because it was written in Erlang or because ejabberd was the defacto implementation of XMPP. They stumbled upon and fixed bugs in BEAM/OTP at their scale [0][1][2]. They also ran FreeBSD (for its superior networking?) on bare-metal hosts running customised system-images [3] and employed networking experts at some point. [0] https://www.youtube-nocookie.com/embed/c12cYAUTXXs https://www.youtube-nocookie.com/embed/c12cYAUTXXs [1] https://www.youtube-nocookie.com/embed/wDk6l3tPBuw https://www.youtube-nocookie.com/embed/wDk6l3tPBuw [2] https://www.youtube-nocookie.com/embed/93MA0VUWP9w https://www.youtube-nocookie.com/embed/93MA0VUWP9w [3] https://www.youtube-nocookie.com/embed/TneLO5TdW_M https://www.youtube-nocookie.com/embed/TneLO5TdW_M
- dnautics 7y agoI could be wrong but I think freebsd allowed multiplexing connections per port before Linux? Please correct me I am mistaken about this.
- scurvy 7y agoThey ran FreeBSD because Jan came from Yahoo, and that's what Yahoo ran.
- vaingloriole 7y ago'customized systems (kernel)..FreeBSD..bare metal': Which is what most of us still do if we care about performance for a single application. Running openmp fortran code for both host/accelerator on oversubscribed vmware or vanilla kvm/qemu for a good laugh and a lot of pain. Simple systems approaches are best even when what you are doing is complicated.
- sitkack 7y agoErlang is like Bugman from the Nightmare Before Christmas. It is literally made out of microservices at every level. Microservices are a design philosophy that people confuse as a deployment strategy.
- dnautics 7y agoNot necessarily, you can design erlang systems with more coupling than you'd expect in traditional microservices. Microservices mean that your codebase is segmented along business concern lines.
- barrkel 7y agoI would rather argue that microservices are best implemented when each service owns a bounded context in the lingo of domain-driven design. Business concerns might align with that, or they may not, depending on how technically complex (vs product complexity) the product is.
- dnautics 7y agoYes, that is a better definition, but nonetheless you can design erlang systems with a single domain, or design erlang systems as a monolith, even if it has a billion actors running around underneath.
- cristaloleg 7y ago> Microservices are a design philosophy that people confuse as a deployment strategy. I'm going to print this and show everyone, great words, thank you.
- bcrosby95 7y agoKinda, yeah, except Erlang is microservices made easier. I've loved how the language makes building distributed systems so comparatively easy since I ran across it back in 2005.
- munchbunny 7y agoThat was probably the biggest impact single decision for WhatsApp technically. As a rule of thumb based on my own experiences and the opinions of more experienced engineers I've had the good fortune to work with, language choice is far less important than the quality of the team using it. While I have no doubt that trying to build WhatsApp in a language that would be the wrong tool for the job (say... PHP) would have been fatal, I have many more doubts that choosing Erlang was the key enabling decision.
- Twisol 7y agoLanguage choice I can perhaps agree with, but from what I've read, the biggest factor with Erlang is much more its runtime environment. BEAM + OTP is a very impressive piece of kit.
- ipnon 7y agoConverse: Can you imagine WhatsApp parallel universe serving with Node?
- jopsen 7y agoYes :) Success is more to do with user experience.. If you hit gold and scale you can almost always optimize the implementation later.
- skrebbel 7y agoIirc Slack's backend is PHP.
- mkopinsky 7y agoThey've moved over everything to Hacklang, which is a derivative of PHP.
- bcrosby95 7y agoI don't know. Erlang is a "funny" language that can somewhat easily do certain things that would be much more time consuming to accomplish in a more mainstream programming language. The difference between building whatsapp in Erlang vs any other programming language is probably larger than building it in php vs any other mainstream language.
- hinkley 7y agoIt's amazing how much effort it takes to do something with the wrong tools. Sunk Cost Fallacy tends to fight any broad-stroke improvements. Until a competitor starts eating your lunch.