Today's Question:  What are you most afraid of as a programmer?        GIVE A SHOUT

Technical Article => Programming =>  Erlang

The use of Erlang in Facebook chat

  sonic0002      2014-02-25 07:12:36      4,967    0

Erlang  is a general-purpose concurrent, garbage-collected programming language and runtime system. It stays strong while building concurrency programs. Erlang provides language-level features for creating and managing processes with the aim of simplifying concurrent programming. It has large application in many chat service well known now such as Whatsapp and initial version of Facebook chat.

Previously we have written an article Use of Erlang in WhatsApp. In this post, we will talk about the story about use of Erlang in Facebook chat. The initial version of Facebook chat is developed by Adam D'Angelo, an early Facebook employee.

While Adam was in college he made a prototype of a chat website with Erlang because it seemed like the ideal language for the task and also it was a chance to have fun learning a new language according to him.

Later Rebekah Cox , Ari Steinberg and Adam worked on the initial Facebook chat prototype as part of a hackathon project in early 2007. Some of the Erlang code were pulled from his personal project while in college. When they decided to make it an official project and productionalize the server code, the team decided to stick with Erlang and took over the code from there.

The rationale was something like:

  • They already have a working prototype to start from.
  • Erlang is good at holding a ton of open connections, which is the hardest part of a chat service.
  • Erlang is easy to learn, even though very few engineers already know it.

The last point, lack of expertise, is a real weakness of the language, but it was outweighed by other factors at the time. Ultimately it contributed to Facebook's decision to move the service to C++, though even with the knowledge that it would eventually be rewritten, It was the right choice to use Erlang for the initial version because of the limited resources they had at the time. It was probably also the right choice for WhatsApp for the same reason.

You can read Ben Maurer's answer to When did Facebook switch away from using Erlang for Facebook Chat? for more details about why Facebook later switched.



Share on Facebook  Share on Twitter  Share on Google+  Share on Weibo  Share on Reddit  Share on Digg  Share on Tumblr    Delicious



No comment for this article.


Honda to Hyundai

By sonic0002
When we add <i> tag to Honda, we get a Hyundai.