What is the BEAM virtual machine?
Answer
The BEAM (Bogdan's Erlang Abstract Machine, sometimes called the Erlang VM) is the virtual machine that runs Elixir and Erlang programs. It is fundamentally different from the JVM — designed specifically for concurrent, distributed, fault-tolerant systems. Key properties: Lightweight processes: BEAM processes are not OS threads — they are extremely lightweight (2KB heap by default), and millions can run concurrently on a single node. Preemptive scheduling: the BEAM scheduler ensures no single process can starve others, unlike cooperative multitasking. Per-process garbage collection: each process has its own heap and GC cycle — a GC pause in one process doesn't stop others. Hot code swapping: code can be upgraded in a running system without downtime. Distribution: BEAM nodes can communicate transparently across a network. These properties make Elixir/Erlang uniquely suited for systems requiring 99.999% uptime (like telecom infrastructure).