Eliminating Single Process Bottlenecks with ETS Concurrency Patterns
summary
Describes concrete ETS-based concurrency techniques: use partitioned keys and table sharding, avoid supervisor-as-router bottlenecks with a rest_for_one startup that creates an ETS-owning gen_server first, and implement a ring buffer using reserve-write-publish semantics so writers reserve slots, write, then atomically publish. Relies on update_counter atomic ops and table-level atomic insert/delete; claims up to ~10x multi-core throughput with proper write-concurrency, and an open-source epoxy library (used in production at TigerTech since August) implements these patterns successfully.
AI-written summary · about
chapters (8)
- 0:00OTP and concurrency basics
- 2:23Introduction to ETS
- 8:38Working with ETS tables
- 16:18Concurrency strategies
- 21:47Advanced data partitioning
- 28:32Supervised concurrency design
- 33:39Atomic operations and patterns
- 40:08Practical implementation examples
related talks
24mGoing CPU Bound
23mElixir GenServer: Understanding Elixir concurrency model
03h 19mWorkshop - All Aboard The Elixir Express!
43mUnlocking the Potential of OTP: Proven Strategies for Application Dev
01h 03mThinking Erlang in a connected world
42mThe Soul of Erlang and Elixir
48mElixir by the Bellyful
53mIdioms for Building Distributed Fault-tolerant Applications with Elixir
