20 years of open source Erlang: OpenErlang Interview with Anton Lavrik from WhatsApp
by Erlang Solutions
May the 20th anniversary celebrations of open sourced Erlang never end! And we don’t intend to slow down. In fact, we are speeding things up as the #OpenErlang party in London fast approaches (you still have time to register and join us on 8th Nov).
Our upcoming #OpenErlang interviews will share more insights on how global companies such as WhatsApp and AdRoll achieved the unachievable, with Erlang being their secret weapon.
Erlang - WhatsApp secret weapon to conquer the globe!
WhatsApp runs on Erlang, and happening to be sponsoring our #OpenErlang London Party in early November. Currently there is 1 billion daily active WhatsApp users, sending 6 billion messages and 4.5 billion photos every day! And there is over 55 billion WhatsApp calls made every day. The ability to process this amount is astonishing and we want to know more about WhatsApp ability to manage their system and provide a smooth experience to their users.
Next in our #OpenErlang interviews we host WhatsApp Server Engineer Anton Lavrik who shares with us why he loves Erlang and how it is used at WhatsApp with tremendous success.
Anton came across Joe Armstrong’s PhD thesis on Erlang 15 years ago as part of his own PhD, and he’s been a supporter of the language ever since, having actively used Erlang for over a decade now.
Whilst he has been using Erlang for a while now, Anton has worked over numerous domains including embedded and real-time systems, domain-specific languages and programming tools, large-scale data collection and processing systems, custom analytic databases, and analytic stacks. Anton began his programming career in 2001 and has since worked as a Technical Lead for Alert Logic amongst other roles before moving to WhatsApp.
WhatsApp was founded in 2009 by ex-Yahoo! Employees Brian Acton and Jan Koum. After buying an iPhone, Koum quickly realised the gaping hole that WhatsApp would eventually fill and the pair found a developer on RentACoder.com named Igor Solomennikov to turn their idea into reality. The early versions of the app would often crash to the point where Koum was considering packing it in to pursue other ventures. His business partner Acton convinced him to stay and just a few months later in June 2009, Apple launched push notifications which would be vital in the evolution of WhatsApp. Users quickly increased to 250,000.
The growth was so sudden that the team decided to change WhatsApp to a paid service (just $1 yearly subscription) as the verification texts were costing the small company too much. By December 2009, you could now send photos via the application as well.
Fast-forward to December 2013 - WhatsApp has 400 million active users every month. Fast-forward again to February 2017 - WhatsApp has over 1.2 billion users globally. And of course, it is a free service. Today, we have over 1 billion daily active users - just wow!
Some other stats to tantalise the tastebuds courtesy of expandedramblings.com:
- 450 million daily active users
- 100 million daily voice calls
- 70% of users that use WhatsApp on a daily basis
- 65 billion WhatsApp messages are sent daily
- There are 1 billion WhatsApp groups
- 4.5 billion photos are shared through on the app daily
- 3 million companies use WhatsApp for business purposes.
Why WhatsApp uses Erlang
Everyone knows WhatsApp - it’s the most popular messaging application that has ever been created - but in terms of the backend? This is often something we don’t think about. WhatsApp will successfully send your message and we all carry on with the rest of our day.
WhatsApp uses a surprisingly small amount of engineers for the billions of users it caters to on a daily basis. How do they manage this?
Like many applications Erlang is involved in, it becomes the one essential cog that all the smaller cogs revolve around.
One of Erlang’s best attributes is concurrency - it is the best multi-tasker out there when it comes to programming languages. Others may try, but they simply can’t run multiple messages and multiple parallel conversations with the efficiency of Erlang. Not only this, but bugs and updates can be fixed and installed without downtime.
Erlang was built to solve very specific problems, in particular scaling a large system with it still remaining highly reliable. Those are the properties that make Erlang so appealing. Not only that but programmers love the language - coders can solve problems on the go and fast!
WhatsApp has completely monopolised the messaging application industry, and Erlang controls it!
At work with the boss breathing down your neck? Or don’t want to be one of those playing videos out loud on public transport? Here’s the transcript, although not as exciting as the real thing.
Anton Lavrik: I came across Erlang about 15 years ago when I was doing research as a part of my PhD and I stumbled across Joe Armstrong PhD thesis.
I got really excited because it basically solved a lot of problems that we were trying to solve using arcane and inefficient techniques.
WhatsApp started with Erlang and we stuck to it. At WhatsApp, we use Erlang for pretty much everything. We’re essentially running on Erlang. Most of our server code is written in Erlang. It would have been really, really difficult to achieve the same result by using any other existing technology. It’s been such an amazing fit for what we do. We’ve done so much with it.
In many ways, we changed the world. We also learned how to use this technology really efficiently and push boundaries.
Many alternative technologies that people use for solving these type of problems, they come short in several different areas. They’re much less efficient for solving problems in this domain. People might choose to implement things in lower level languages like C++ where they have more optimisation opportunities, but then they have to implement half of Erlang by themselves, or some of the scripting languages which may offer more rapid development or prototyping, they wouldn’t be able to scale the system. Especially while keeping it reliable.
Erlang has an amazing set of really powerful ideas and techniques behind it. A lot of other languages and environments are trying to learn from it and borrow its features, getting a great exposure. Another aspect of it is that many people from technology actually start using Erlang and get attracted by Erlang. They can experience all those great benefits firsthand.
What I like about being a software engineer? It’s a really wonderful mix of creativity and solving real problems.
[00:02:41] [END OF AUDIO]
OpenErlang; 20 Years of Open Sourced Erlang
Erlang was originally built for Ericsson and Ericsson only, as a proprietary language, to improve telephony applications. It can also be referred to as “Erlang/OTP” and was designed to be a fault-tolerant, distributed, real-time system that offered pattern matching and functional programming in one handy package.
Robert Virding, Joe Armstrong and Mike Williams were using this programming language at Ericsson for approximately 12 years before it went open source to the public in 1998. Since then, it has been responsible for a huge number of businesses big and small, offering massively reliable systems and ease of use.
OpenErlang Interview Series
As mentioned, this isn’t the first in the #OpenErlang Interview series. We have three more existing videos to enjoy.
Robert Virding and Joe Armstrong
It only seems fitting to have launched with the creators of Erlang; Robert Virding and Joe Armstrong (minus Mike Williams). Robert and Joe talk about their journey with Erlang including the early days at Ericsson and how the Erlang community has developed.
Last week was the launch of our second #OpenErlang Interview from Ericsson’s Chris Price. Currently the President of Ericsson’s Software Technology, Chris has been championing open source technologies for a number of years.
Chris chats to us about how Erlang has evolved, 5G standardization technology, and his predictions for the future.
Jane is a serial entrepreneur of the tech persuasion. She was instrumental in promoting and open sourcing Erlang back in the 90s. Since then, she has continued her entrepreneurial activities, helping launch countless startups within the technology sector from 1999 to present day. Her work has spanned across many influential companies who use the language including Klarna, Tobil Technology, Teclo Networks and Bluetail, which she founded herself.
Other roles have included Member of the Board at Racefox, Creades AB and Royal Swedish Academy of Engineering Sciences, and a key role in the Swedish Government Innovation Council.
Having become an open source programming language, Erlang was allowed to flourish. It gained a passionate following which has since developed into a close community. Simon Phipps dedicates his time to open source promoting languages such as Erlang through the Open Source Initiative and other similar schemes.
Why are open source languages such as Erlang so important? Find out more!
Other Erlang Solutions Activities…
OpenErlang London Party
It’s time to party! We have partnered with WhatsApp and æternity to hold a special Erlang celebration in London this November! Tickets are free and you’re all invited. Sign up here to RSVP and join us for delicious food, free-flowing drinks, and entertainment!
16 lessons I learnt using the BEAM
Our October webinar was by Joseph Yiasemides has he talked us through the lessons he has learnt over the years. You may have missed the webinar, but it is available now on YouTube. Sign up to our webinars newsletter to get specific invites to our monthly webinars.
If you’re interested in contributing and collaborating with us at Erlang Solutions, you can contact us at firstname.lastname@example.org.Go back to the blog