tions, each involving communication
with a number of simultaneously open
channels. The work involved in parsing and processing the data on any one
channel is small, but handling many
thousands of simultaneous channels
is a technical challenge.
Erlang’s usefulness in IM is demonstrated by three projects:
MochiWeb ( http://code.google.com/p/
mochiweb). Designed for building
lightweight HTTP servers developed by
MochiMedia for high-throughput, low-latency analytics, and ad servers, this
Erlang library helps power Facebook
chat among more than 70 million users;
Ejabberd ( http://www.ejabberd.im).
Written by Alexey Shchepin, this Erlang implementation of the XMPP
protocol is the most widely used open
source XMPP server; and
com). This Erlang implementation
of the Advanced Message Queuing
Protocol standard provides reliable
asynchronous message passing at Internet scale.
Schema-free databases. In traditional databases, data is stored in
rectangular tables, where the items in
a table are instances of simple types
(such as integers and strings). Such
storage is not particularly convenient
for storing an associative array or arbitrary tree-like structure. Examples
structures (called hashes in Perl and
Ruby and maps in C++ and Java) and of
the latter XML parse trees. These objects are difficult to store in a regular
tabular structure. Erlang has for a long
time had its own database, called mnesia, that includes table storage but allows any item in a table cell to also be
an arbitrary Erlang data structure.
Databases implemented in Erlang
are particularly well-suited for such
storage, especially when they interface with some form of communicating agent. Three notable databases are
implemented in Erlang:
org/couchdb/). Written by Damien
Katz, “Apache CouchDB is a distrib-
uted, fault-tolerant, schema-free doc-
ument-oriented database accessible
via a RESTful HTTP/JSON API.” It pro-
vides robust, incremental replication
with bidirectional conflict detection
and resolution, queryable and index-
able through a table-oriented view
default view-definition language;
I thank Ericsson Telecom for its contribution to the development of Erlang
over the years.
1. Agha, g. Actors: A model of concurrent computation
in distributed systems. In MIT Series in Artificial
Intelligence. MIt press, cambridge, MA, 1986.
2. Armstrong, j. Programming Erlang: Software for a
Concurrent World. the pragmatic bookshelf, raleigh,
3. Armstrong, j. A history of erlang. In Proceedings of
the Third ACM SIGPLAN Conference on the History
of Programming Languages (dan diego, cA, june
9–10). AcM press, new york, 2007.
4. Armstrong, j. Making Reliable Distributed Systems in
the Presence of Errors. ph.d. thesis, royal Institute
of technology, Stockholm, 2003.
5. Armstrong, j. concurrency-oriented programming
in erlang. Invited talk at the lightweight languages
workshop (cambridge MA, nov. 9, 2002).
6. Armstrong, j.l., Virding, S.r., and williams, M.c.
use of prolog for developing a new programming
language. In Proceedings of the First Conference on
the Practical Application of Prolog (london, Apr. 1–3).
Association for logic programming, 1992.
7. blau, S. and rooth, j. Axd 301: A new-generation
AtM switching system. Ericsson Review 1 (1998).
8. claessen, K. and hughes, j. Quickcheck: A
lightweight tool for random testing of haskell
programs. In Proceedings of the Fifth ACM
SIGPLAN International Conference on Functional
Programming. AcM press, new york, 2000, 268–279.
9. däcker, b. Concurrent Functional Programming for
Telecommunications: A Case Study of Technology
Introduction. licentiate thesis. royal Institute of
technology. Stockholm, 2000.
10. gray, j. Why Do Computers Stop and What Can Be
Done About It? tech. rep. 85. 7. tandem computers,
11. guerraoui, r. and Schiper, A. fault tolerance by
replication in distributed systems. In Proceedings of
the Conference on Reliable Software Technologies.
Springer Verlag, 1996, 38–57.
12. hoare, c.A.r. Communicating Sequential Processes.
prentice hall, upper Saddle river, nj, 1985.
13. li, h., thompson, S., orosz, g., and toth, M.
refactoring with wrangler: data and process
refactorings and integration with eclipse. In
Proceedings of the Seventh ACM SIGPLAN Erlang
Workshop (Victoria, bc, Sept. 27). AcM press, new
york, 2008, 61–72.
14. lindahl, t. and Sagonas, K. detecting software
defects in telecom applications through lightweight
static analysis: A war story. In Proceedings of the
Second Asian Symposium (taipei, taiwan, nov. 4–6).
Springer, 2004, 91–106.
15. Occam Programming Manual. prentice hall, upper
Saddle river, nj, 1984.
16. Schütt, t. Schintke, f., and reinefeld, A. Scalaris:
reliable transactional p2p key/value store. In
Proceedings of the Seventh ACM SIGPLAN Workshop
on Erlang (Victoria, bc, Sept. 27). AcM press, new
york, 2008, 41–48.
17. wiger, u., Ask, g., and boortz, K. world-class product
certification using erlang. In Proceedings of the 2002
ACM SIGPLAN Workshop on Erlang (pittsburgh, pA).
AcM press, new york, 2002, 24–33.
18. wiger, u. fourfold increase in productivity and
quality: Industrial-strength functional programming
in telecom-class products. In Proceedings of the
Workshop on Formal Design of Safety Critical
Embedded Systems (Münich, Mar. 21–23, 2001).
Joe Armstrong ( firstname.lastname@example.org) is an
expert in software architectures and programming
languages in business unit networks at ericsson,