Elixir Mentor

Alex Koutmos on Elixir Patterns

13 snips
Apr 27, 2024
Alex Koutmos, software engineer and author focused on Elixir and the BEAM, shares practical patterns from his book Elixir Patterns. He talks about GenServer and supervisor recipes, when to avoid GenServers, and using ETS and match specs. Discussions include building workflow engines with digraph, observability with Promex, and real-world operational security stories.
Ask episode
AI Snips
Chapters
Books
Transcript
Episode notes
ADVICE

Use OTP When You Need State

  • Learn OTP constructs once you need to move from intermediate to advanced Elixir.
  • Use GenServer, supervisors, and behaviors only when state or side effects require them.
ADVICE

Avoid GenServer Read Bottlenecks

  • Avoid bottlenecking reads by putting frequently-read data into a single GenServer.
  • Prefer ETS or other concurrent stores when many consumers need direct access.
INSIGHT

ETS Is A Pragmatic Escape Hatch

  • ETS provides a built-in, tunable key-value store on the BEAM that acts as a pragmatic escape hatch.
  • Erlang/Elixir balance purity with practical mutable facilities for real-world needs.
Get the Snipd Podcast app to discover more snips from this episode
Get the app