Designed for concurrency
from the ground up,
the Erlang language can be
a valuable tool to help
solve concurrent problems.
Jim Larson, Google
Erlang is a language developed to let mere
mortals write, test, deploy, and
debug fault-tolerant concurrent
software. 1 Developed at the Swedish telecom company
Ericsson in the late 1980s, it started as a platform for
developing soft realtime software for managing phone
switches. 2 It has since been open-sourced and ported to
several common platforms, finding a natural fit not only
in distributed Internet server applications, but also in
graphical user interfaces and ordinary batch applications.
Erlang’s minimal set of concurrency primitives,
together with its rich and well-used libraries, give guidance to anyone trying to design a concurrent program.
Erlang provides an effective platform for concurrent
programming for the following reasons:
• The language, the standard libraries (Open Telecom
Platform, or OTP), and the tools have been designed
from the ground up for supporting concurrency.
• There are only a few concurrency primitives, so it’s easy
to reason about the behavior of programs (though there
are limits to how easy this can ever be).
• The implementation makes the simple primitives fast
and scalable, and makes effective use of modern multicore hardware, eliminating the need for more complex
mechanisms.
• The execution model eliminates some classes of errors
from unsynchronized access to shared state—or at least
makes these errors more noticeable.