DiscoverBEAM There, Done That
BEAM There, Done That
Claim Ownership

BEAM There, Done That

Author: Plangora

Subscribed: 3Played: 312
Share

Description

BEAM There, Done That is a podcast about building real systems with Elixir, Erlang, and the BEAM.

We’ve built it before — distributed systems, fault‑tolerant services, event pipelines, real‑time apps, production nightmares, and the supervision trees that saved them.

Each episode dives into practical lessons from shipping software on the BEAM: architecture decisions, scaling challenges, operational failures, and the patterns that actually work.

No hype. No theory without scars. Just hard‑won experience from engineers who’ve been there.
38 Episodes
Reverse
A Nerves device at SmartRent once reported an exception in which an empty list had become a zero. The timestamp and location showed it came from Florida, just as a hurricane made landfall and a brownout hit the area. A bit had flipped in memory. The GenServer crashed, the supervisor restarted it, and the resident never noticed anything. Frank Hunleth only looked into it out of curiosity.Frank created Nerves. Omer Kilic runs Ordinatra Minima, a London hardware and manufacturing consultancy, and worked on Erlang Embedded at Erlang Solutions and built Erlang/ALE. In 2013, at Erlang Factory San Francisco, Omer ran the embedded Erlang tutorial where Joe Armstrong got the LEDs on his board blinking. It was also the first time the two of them met.The episode starts from a single line of Elixir, Circuits.GPIO.write, and follows it down the stack: through the kernel driver to a pin, across microcontrollers, 20-cent RISC-V chips and FPGAs, and then out to fleets of devices in people's homes. Their rule for splitting the work is that the BEAM decides when and the hardware decides how fast.Squeezing Erlang into 8 MB of flash on a MIPS board before Nerves existedA handheld retinal diagnostic device built in C++ with hand-rolled actors and a supervisorWhy "bare metal" means a microcontroller or an FPGA, and not Linux or an RTOSHardware real time: a guaranteed upper bound on how long something takes, not just "fast enough"From Erlang/ALE to Elixir ALE to CircuitsWhen soft real time is enough for an LED and when it isn't (PWM dimming, Morse code, NeoPixels)Kernel interrupt timestamps in Circuits.GPIO, driving NeoPixels over SPI, hardware PWM, and kernel LED patterns with DeluxHeterogeneous SoCs as tiny distributed systems on a single chipCompanion microcontrollers over UART, SPI, I²C, CAN or RS-485, and putting them under your supervision treeJIT on ARM64 but not on RISC-V, and why DRAM matters more than CPU architectureWhy boring hardware wins in production, and why hobbyists should push the BEAM anywayGoing from one board to 10,000: fleet management, NervesHub, NervesCloud and SentrySecurity from the napkin sketch onwards: secure elements, device identity and fast firmware updatesRecorded 11 November 2026.Resources mentioned: Nerves, Circuits (GPIO, I²C, SPI), Delux, NervesHub, NervesCloud, Erlang/ALE, Omer's Code Mesh talk "Bare Metal from a Hardware Perspective: Embedded Frameworks and Build Systems", Build a Binary Clock with Elixir and Nerves by Frank Hunleth and Bruce A. Tate (Pragmatic Bookshelf), the Nerves Discord (nerv.es/discord).
In the first version of Jido, every agent was a DynamicSupervisor. Each GenServer also kept a private queue in its own state so an action could push follow-up work to the front of the line instead of waiting in the mailbox. Mike Hostetler calls both decisions things he still cringes at, and he rebuilt the framework for 2.0 to get rid of them.Jido began as bot infrastructure before there was a model to call, and the LLM is still kept out of the core on purpose. In Jido an agent is a validated struct. The process that runs it is a separate concern, and side effects are returned as directives for the runtime to carry out. Mike's estimate is that an agent is about 20% LLM and 80% patterns the BEAM community has relied on for decades.Allen and Francesco take one support-desk scenario through the whole episode: a customer asks where their order is, and the shipping provider times out halfway through. The scenario covers retries, crashes eight tool calls into a reasoning loop, models that are confidently wrong, and 10,000 customer agents of which only 200 are in memory at any moment. Mike also covers ReqLLM, the weekend side project that now handles 11 providers and 665 models, and how Jido and Ash ended up working together instead of competing.How Jido defines an agent: data enters a stateful process, changes it, and emits a resultSignals (CloudEvents envelopes), actions, instructions and directivesThe scars from 1.0: a mailbox-bypassing queue in GenServer state and agents as DynamicSupervisorsDefining the agent turn, and why one GenServer was doing too muchThe OTP 28 priority messages experiment and where reentrancy is heading in Jido 3Why the core supports behaviour trees and FSMs alongside ReAct and tree of thoughtsHibernate and thaw: idle agents written to a persistent store after 30–60 secondsWhat happens when an LLM call times out (async task, three retries by default) and when the orchestrating process crashesHallucinations: evals, DSPy/GEPA prompt-level guardrails, and tool-level guardrails written in codeReqLLM and LLMDB: normalising inference across OpenAI, Anthropic, Gemini, Bedrock, Azure and OpenRouterAsh Jido: Ash resource actions exposed as agent tools with authorization policies intactHosting agents in Python and TypeScript: one agent per Docker container, or per 256 MB sandboxMaintaining dozens of packages with agents, GitHub Actions and optional dependenciesRecorded 9 November 2026.Resources mentioned:Jido and documentation https://jido.run/Jido AI https://jido-ai.hexdocs.pm/ReqLLM https://reqllm.hexdocs.pm/LLMDB https://llmcatalog.dev/Zoi https://github.com/ash-project/zoiJido Discord https://jido.run/discordMoatless https://moatless.store/
Alejandro Ramallo spent months losing sleep over NIF memory leaks that only appeared under high load and were almost impossible to reproduce. The fix in the latest Bondy Connect release: remove every NIF, go pure Erlang, and replace the storage layer with an operation-based CRDT database running causal+ consistency.A decade of running that distributed router in production, and maintaining Partisan underneath it, is the background to Bondy, the declarative language Alejandro introduced at Code BEAM a week before this recording. It targets a specific pain: business rules spread across gen_statem states and clauses until nobody can say where a rule lives.Bondy is statically typed, compiles to ordinary BEAM files and calls Erlang and Elixir directly. It combines Datalog for queries with Constraint Handling Rules for reacting to events and writing solvers. At Leapsight, rules that took around 800 lines of Erlang come down to 40–50 lines of Bondy, and a fluid-delivery scheduling solver for upstream oil and gas took one week instead of three months.Using a fleet of refrigerated trucks as the running example, Allen and Francesco work through what runs today, what is designed but not built, and what is on the roadmap.• NIF memory leaks and control-plane conflict-resolution bugs in Bondy Connect, and how both were removed• Why a library wasn't enough: rules, data and types sharing one language• Shapes: one definition that is both type and runtime validator, including cross-field invariants• Unification for sensor data that arrives in pieces• Structured, path-based errors written for humans and coding agents• The effect system: capabilities, pure guards and synthesis holes• gen_reactor, a new OTP behaviour that runs rules to a fixed point under normal supervision• How CHR semantics, propagation history and termination/confluence analysers keep rules from fighting or looping• Signals, fluents and logical time for latching alarms and queryable history (designed, not yet implemented)• Datalog relations for escalation chains that terminate even when the hierarchy loops• Semi-naive evaluation today; magic sets, cost-based optimisation and incremental view maintenance on the roadmap• Well OS, CHR-based solvers, and where coding agents help or break architectureRecorded October 30, 2026.Resources:Bondy language: https://www.bondy.io/languagePartisan, Constraint Handling Rules (Thom Frühwirth, 1991), and the upcoming Bondy public release are discussed in the episode.
Hernán Rivas Acosta's first Erlang game server, a football game for Cartoon Network, reached 50,000 concurrent players on one machine. The BEAM didn't stop it there. The OS file descriptor limit did, and the team chose not to raise it. The Java option they had considered would have managed a few thousand.Roughly fifteen years later, Hernán, now an architect at Erlang Solutions, has put the game loop itself on the BEAM. Spawndemonium, shown at Code BEAM Europe in Haarlem, is a top-down shooter whose simulation is written once in Rust, compiled to WebAssembly, and run both in the browser and inside an Elixir GenServer via Wasmex. Client and server can't disagree about the rules, only about time.The scar: AstroBeam's 30 Hz tick needed 33.3 ms, the Erlang timer took 33, and lag crept upward through every match. One-minute playtests never caught it. The fix was 40 ticks a second at 25 ms each, plus rewriting every per-tick constant in the game.With Allen Wyma and Francesco Cesarini, Hernán covers ticks versus timestamps, why jitter breaks more games than latency, how to fake a bad network convincingly, and why the demons in Spawndemonium act on inputs five ticks old.Topics include:• From Flash games for Cartoon Network and Nickelodeon to Erlang at 18• 50,000 TCP connections per machine, capped by file descriptors• Peer-to-peer anti-cheat built on mutual reporting• Ticks, tick rate, ping vs latency, and jitter• Authoritative servers vs peer-to-peer, and Modern Warfare 2's host advantage• BEAM processes explained through game-engine time slicing• Why browser games are stuck on TCP via WebSockets• Borrowing netcode from Gran Turismo for a multiplayer Asteroids• Delay input, apply and rewind, or meet in the middle• Clock sync using the smallest round trip• Simulating jitter with a log-normal distribution and TCP head-of-line blocking• One server tick: queue inputs, run Wasm, decode binary events, push to sockets• A custom binary protocol with Elixir pattern matching instead of JSON• Wasmex vs a Rustler NIF: a crash costs one match, not the node• Bots as laggy players, deciding moves five ticks ahead• Small universes vs MMO-scale worlds• Multiplayer first, game secondRecorded October 26, 2026.Resources:Spawndemonium on GitHub: https://github.com/HernanRivasAcosta/SpawnDemoniumEpisode 15 — Ellyse Cedeno on MMO servers: https://youtu.be/4MDObD_R5E4Episode 10 — Florian Gilcher and Leandro Pereira on Rust and Elixir: https://youtu.be/w5Pl09lpSmEMat Trudel on Bandit: https://youtu.be/XXQcoz_dTE0
In 2017, Davide Bettio created AtomVM to run Erlang, Elixir and Gleam code on embedded devices with just a few kilobytes of memory. Fast forward to today, and Giacomo Cavalieri of the Gleam core team has built tooling that flashes a Gleam project onto a board with a single command.Two dollars, some sensors, and a weekend is all it takes to get started with embedded Erlang development. No more dealing with low-level C, complex drivers, or painful debugging. Gleam's delightful developer experience combined with AtomVM's BEAM bytecode support brings approachable IoT to the masses.In this episode, Davide and Giacomo share:How AtomVM squeezes the BEAM onto memory-constrained devicesWhy Gleam and AtomVM are a perfect match for hobbyists and studentsDavide's "scar story" of a buggy AtomVM-powered home thermostat leaving him debugging in the coldThe trade-offs of the AtomVM standard library and how to extend itWriting Gleam bindings for AtomVM features via Erlang FFIExample projects to tackle as an embedded Gleam beginnerWhat's possible with $2 boards, some sensors, and MQTTRecorded October 12, 2026.Resources:AtomVM: https://github.com/AtomVM/AtomVMAtomVM website: https://atomvm.orgAtomVM Gleam bindings: https://hex.pm/packages/atomvm_gleamOrbital Gleam library: https://github.com/giacomocavalieri/orbital
loading
Comments