Cracking the PubSub Code. Elixir's Key to Scalable Real-Time Systems
summary
Shows a concrete PubSub setup using Phoenix.PubSub with a GenServer state store that broadcasts an updated car count across two nodes connected by libcluster, demonstrating live synchronization (increment on one node appears on the other). Builds a LiveView parent and LiveComponent child that broadcast creates and toggles to update streams in real time. Compares adapters: default PG-based adapter works cluster‑native, Redis adapter requires a running Redis and becomes unusable when Redis dies, proving the single point of failure.
AI-written summary · about
chapters (7)
- 0:00PubSub and Elixir intro
- 4:01What is PubSub architecture
- 8:41Phoenix PubSub adapters
- 11:14Backend use case Phoenix PubSub
- 15:08Redis adapter demo
- 17:00Frontend use case LiveView
- 21:41Summary
related talks
33mDiscovering distributed systems in Elixir
39mBeyond Liveview: Real Time Features With Liveview
35mpg2 and You: Getting Distributed with Elixir
37mMultiplayer games and (...) with LiveView
05mLT: Verified Pub/Sub
53mElixir: a potion to mix complexity and concurrency in real‑time
39mAn adventure in distributed programming
28mLobbying with Elixir: Real-Time LiveView and OTP
