Introduction to Erlang

Erlang is a functional, concurrent, dynamically typed language designed for building massively scalable, soft real-time, highly available systems.

1.1 What is Erlang?

Erlang is a functional, concurrent, dynamically typed language designed for building massively scalable, soft real-time, highly available systems. It runs on the BEAM virtual machine and ships with OTP (Open Telecom Platform), a set of libraries and design principles.

Key properties:

Lightweight processes — millions per node, isolated, no shared memory.

Message passing — asynchronous communication between processes.

Fault tolerance — "let it crash" + supervision trees.

Distribution — processes on different machines communicate transparently.

Hot code swapping — upgrade running systems without downtime.

Soft real-time — preemptive scheduling, per-process garbage collection.

Immutable data and single assignment variables.

1.2 History

Joe Armstrong begins Erlang at Ericsson's Computer Science Laboratory

Robert Virding and Mike Williams join; first implementation in Prolog BEAM VM development begins OTP framework released

AXD301 switch (reported "nine nines" availability); Erlang open-sourced SMP (multicore) support Maps introduced (OTP 17) JIT compiler BeamAsm (OTP 24) maybe expression (OTP 25)

OTP 27: json module, triple-quoted strings, sigils, -doc attributes

OTP 28: priority messages, further improvements

1.3 Who uses Erlang?

Ericsson (telecom switches, ~half of global mobile traffic touches Erlang), WhatsApp, RabbitMQ, CouchDB, Riak, Klarna, Cisco, Nintendo (Switch notification servers), Bet365, EMQX (MQTT broker), Vernemq, Heroku routing, and much of the Elixir ecosystem.

1.4 The Erlang philosophy

Processes are the units of failure isolation. Let it crash — write the correct path; recover through supervisors.

Share nothing — copy messages, no locks.

Error kernel — keep the critical core small and robust.