BEAM OTP: Why Everyone Keeps Reinventing It

2026-05-14 · source · source ↗ · raw capture · wiki page

Core Thesis

Modern AI and distributed systems frameworks continuously rediscover the actor model because the BEAM runtime has embedded these patterns at the VM level since 1986 -- solving genuinely difficult concurrency problems in ways other platforms cannot fully replicate.

The Concurrency Problem

Two fundamental approaches: 1. Shared state with locks -- race conditions, lock contention, cascading failures 2. Isolated state with message passing -- each concurrent unit owns its memory, communication via messages only (the actor model, Hewitt 1973, Erlang 1986)

What Makes BEAM Processes Different

Message Passing

"Let It Crash"

"'Let it crash' does not mean 'ignore errors.' It means: separate the code that does work from the code that handles failure."

Supervisors handle recovery: - :one_for_one -- restart only the failed child - :one_for_all -- restart all children if any fails - :rest_for_one -- restart failed child and subsequent children

Runtime Properties That Cannot Be Replicated

AI Agent Connection

"An AI agent is long-lived, stateful, failure-prone, and concurrent. This maps directly to BEAM processes."

The Python ecosystem is building this in userspace with asyncio, Pydantic models, and custom retry logic -- recreating what BEAM provides natively.

The Pattern of Reinvention

Tradeoffs

Excels at: concurrent fault-tolerant systems, long-lived stateful connections, predictable latency under load Struggles with: raw computational throughput, ecosystem size (Python dominates ML/AI), learning curve