Programming Elixir Chapter 19 Notes


A More Complex Example

A day for reading and playing with Dave’s code. I’ll be keeping the duper source around for future reference to starting multiple servers.

  1. Map.update/4 is something I wish I’d had in Python.

  2. A DynamicSupervisor starts an arbitrary number of workers at runtime.

  3. When using DynamicSupervisor, you cannot name the children in the start_link function because the same module is run in multiple child servers.

  4. When initializing a server, don’t interact with anything that uses the server.

  5. Each GenServer call or cast function has a default timeout of five (5) seconds.

All notes and comments are my own opinion. Follow me at @rgacote@genserver.social