Erlang/OTP

Erlang/OTP

A language built for concurrent, fault-tolerant systems

Description

Building a service that must hold hundreds of thousands of connections and never go down for maintenance normally means assembling it yourself: a thread pool with locks, a supervising process on top, and some scheme for hot updates. Erlang builds those into the language and runtime — lightweight processes plus "let it crash" supervision trees. A process costs a few hundred bytes, a crashed one is restarted by its supervisor under a defined policy rather than taking the system with it, and module code can be swapped while the system runs.

It came out of Ericsson's telephone switching work, designed from the start around staying up for years. The language is functional with immutable bindings, processes share no memory and communicate only by message passing, so scaling across cores does not hand you locks and race conditions to manage. Distribution is built in: the same code runs across machines and sending a message to a remote process reads exactly like sending to a local one.

OTP is the standard framework and library set shipped alongside — behaviors like gen_server and supervisor that fix the shape of common service skeletons — which is why Erlang in practice means Erlang/OTP. RabbitMQ, CouchDB and ejabberd are built on it, and Elixir runs on the same virtual machine. Apache 2.0, on Windows, Linux and macOS.

Features



Lightweight processes: scheduled by the VM at a few hundred bytes each, so running hundreds of thousands on one machine is routine — a different order of magnitude from OS threads.

Supervision and fault tolerance: supervisors watch child processes under configured restart strategies, so a process exiting abnormally is restarted rather than escalated — letting it crash is the encouraged style, not an incident.

Hot code upgrades: module code can be replaced in a running system, with existing connections finishing on the old version while new requests take the new one, and no maintenance window.

Message-passing concurrency: processes share nothing and communicate asynchronously, which removes locks and data races at the root rather than managing them.

Built-in distribution: nodes form a cluster and sending across machines is written the same way as sending locally — distribution is part of the language rather than a bolted-on library.

The OTP framework: gen_server, gen_statem, supervisor and other behaviors standardize services, state machines and supervision so each project does not reinvent them.

Interactive shell: erl gives an interactive environment for evaluating expressions and attaching to running nodes to observe and debug, keeping the change-and-check loop short.

Pattern matching and immutability: functional syntax, single-assignment bindings and matching in function heads make state flow in concurrent code easier to reason about.

Cross-platform and open: Apache 2.0 licensed, with a Windows installer and source or package-manager installs on Linux and macOS.