Other meanings of Erlang (programming language)
Programming Languages
Erlang is a general-purpose, concurrent, functional programming language designed for building highly available, fault-tolerant systems. Developed at Ericsson in the late 1980s, it is named after the Danish mathematician and engineer Agner Krarup Erlang, who pioneered queueing theory and traffic engineering. Erlang is best known for its lightweight process model, message-passing concurrency, and the 'let it crash' philosophy, which underpins its use in telecommunications, messaging platforms, and distributed systems.
Erlang was created by Joe Armstrong, Robert Virding, and Mike Williams at the Ericsson Computer Science Laboratory in 1986, with the first public release following in 1987. The language was developed to address the challenges of programming telephone exchanges, which require massive concurrency, high availability, and the ability to upgrade systems without downtime. Its design draws on logic programming (Prolog) and functional languages, incorporating pattern matching, immutable data, and recursion as core constructs.
The name 'Erlang' is a portmanteau of 'Ericsson Language' and a tribute to Agner Krarup Erlang, whose work on queueing theory informs the language's approach to managing concurrent workloads. Erlang's runtime, the BEAM virtual machine, was designed to support millions of lightweight processes, each with its own memory and scheduling, enabling soft real-time responsiveness and fault isolation.
Erlang's concurrency model is based on isolated processes that communicate only through asynchronous message passing, avoiding shared memory and locks. Each process is scheduled by the BEAM VM, which uses preemptive scheduling to ensure fairness and responsiveness. This model allows developers to build systems that scale across multiple cores and distributed nodes seamlessly, as processes can be placed on different machines without changing the programming model.
Fault tolerance is achieved through the 'let it crash' philosophy: rather than trying to handle every error, programmers design systems where processes fail fast and are supervised by a hierarchy of supervisors that restart them according to predefined strategies. The Open Telecom Platform (OTP) is a set of libraries and design principles that implement these patterns, including gen_server, gen_fsm, and supervisors, making Erlang a robust choice for building reliable distributed systems.
Erlang's ecosystem includes the Erlang/OTP distribution, which provides a comprehensive set of libraries for networking, database access, and distributed computing. The language has been used in numerous high-profile systems, including the original Ericsson telephone switches, the WhatsApp messaging platform (which handled billions of messages with a small team), and the RabbitMQ message broker. Erlang's hot code loading capability allows systems to be updated without stopping, a feature critical for telecom and financial applications.
Beyond its traditional domains, Erlang has influenced other languages and platforms. Elixir, created by José Valim in 2011, runs on the BEAM VM and brings Ruby-like syntax to the Erlang ecosystem, expanding its adoption in web development. The language also finds use in IoT, gaming, and blockchain projects, where its reliability and concurrency are valued.
Erlang's development was nearly abandoned in the early 1990s, but the language was saved by a successful demonstration of its use in a large telecom switch, leading to its commercial adoption. The first version of Erlang was implemented in Prolog, and it was only later that a dedicated virtual machine was built. The BEAM VM's name stands for 'Bogdan/Björn's Erlang Abstract Machine', after its creators, and it uses a unique instruction set that has been optimized for pattern matching and recursion.
Erlang's documentation and community are known for their emphasis on correctness and testing, with tools like QuickCheck (property-based testing) and Dialyzer (static analysis) being integral to the development workflow. The language also supports distribution with built-in node discovery and clustering, and its ability to handle millions of concurrent connections has made it a favorite for real-time web applications, such as chat systems and multiplayer games.
Erlang is a registered trademark of Ericsson AB.
Help improve the encyclopedia. Reports go straight to the site manager.