Erlang/OTP – the language

Erlang is a programming language designed in the late 80s at the Ericsson CSLab, a research laboratory that was in operation from March 1, 1984, to June 30, 2002, at Ericsson, Älvsjö, 10 minutes by commuter train from the center of Stockholm.

The language was designed for programming telecom systems, where handling concurrency, being fault tolerant, and having easy to maintain systems which are working 24×7 are some of the most important issues. After analyzing some of the available programming languages and technologies, the research group in charge of selecting the best language for Ericsson’s telecom systems, decided to implement a new one from scratch. About a decade later, after being used by Ericsson internally for several projects, in December 1998 the language was released as Open Source.

Erlang has several key features and advantages over other options:

  • It is declarative, with a high abstraction level. In fact it has a lot in common with functional languages like Haskell or ML. This means less code, and easiest to maintain programs. There are some articles claiming that Erlang programs have four to ten times less code than C or Java programs.
  • The language is process oriented (as opposed to object oriented), and handles massive concurrency and message passing. Concurrency and distribution are inside the language, not an addition as in Java or C.
  • Hot code loading. Systems can easily be upgraded without stopping.
  • Powerful fault tolerance mechanisms based in organizing the program in supervision trees.
  • Transparent and very natural distribution. A program designed for working in a machine can be distributed among several ones almost without changing the source code.
  • Independence from hardware and operating system.
  • Open Telecom Platform (OTP): a set of applications, libraries, design patterns (Erlang behaviours), and programming rules and all kind of things for making life easier for people programming in Erlang

As a summary: Erlang is a very interesting language, and an option you should have a look into if you have plans for implementing a telecom system or a control system, where the advantages of the technology are more powerful. I am not saying that Erlang cannot be used for other kind of projects (there are some examples of using it for banking or business management applications), but in this area is almost unbeatable.

I will talk more about this language from now on, in the Erlang section of the weblog.

Leave a Reply

Your email address will not be published. Required fields are marked *