Who uses Erlang, and why?


I talk to a lot of people about Erlang, usually programmers who code in mainstream languages. A surprising number of them have heard about Erlang because of WhatsApp. It definitely helps for a niche programming language to have a famous use case.

There are many other well known examples of systems and software that use Erlang. Here we focus on 3 examples and why they are built using Erlang.


Riak

Riak is an open-source distributed (clustered) database developed by Basho with a focus on high availability, scalability, and fault tolerance. Riak is also available in an enterprise version, with support.

Per the famous CAP Theorem, a distributed system cannot simultaneously provide Consistency, Availability, and Partition tolerance. Often it is possible to provide only two out of the three features viz., C, A, P.

Riak focuses on high Availability and strong Partition tolerance, and provides what is called eventual Consistency. This CAP choice makes Riak well-suited as a distributed database for web-scale applications such as social media which require fault tolerance, high availability, repair/healing capability, and predictable latency. Riak works well with unstructured data, and offers search and secondary indexes in addition to MapReduce.

Basho has outlined their reasons for building Riak using Erlang, including extremely high availability and live run-time management features.

 

RabbitMQ

RabbitMQ is an open-source message broker developed by Rabbit Technologies, now part of Pivotal.

A common application of a message broker is the consumption of task queues in a structured and reliable manner. A queue can contain several types of tasks, including web workers, data feeds, web logs etc.

RabbitMQ implements the AMQP messaging standard, and supports protocols such as HTTP, STOMP, and MQTT. It offers high throughput and high availability using a cluster-based architecture. RabbitMQ is well suited for applications that process real-time data feeds, including data streams from the Internet of Things (IoT).

The reasons for building RabbitMQ in Erlang include distribution, live code upgrade, built-in process monitoring and control, predictable throughput/latency, and proven enterprise readiness.


Chef

Chef is a popular open-source infrastructure management tool for web-scale systems, either on the cloud or in data centers. It is developed by Chef which also offers a supported enterprise version.

Chef defines recipes to automate infrastructure tasks. A typical example could be spinning up more servers to handle a spike in load for a web service, and to bring these down afterwards. Apart from automation benefits, a Chef server ensures high-availability of the service, provides analytics, and can be used to enforces IT policies such as security. Chef is a leading champion of the synergized role of DevOps in today's IT organizations.
 
 Starting with Version 11, the Chef server has been implemented in Erlang. The reasons for choosing Erlang are best quoted directly from the Chef blog: "its share-nothing memory and process model, multi-core scalability, and the soft-realtime performance resulting from Erlang’s per-process garbage collection model."