3 years is a lot of time and I wonder how much changed from the time of publishing and what is not covered in the book?


I was just skimming through the book and noticed that Todo.Cache in Ch9 is not using DynamicSupervisor behavior. Is it intended?

Searching "use DynamicSupervisor" didn't gave anything and I really didn't read yet. But really looking forward to it! Thanks for the second edition!

Does this book cover strategies for achieving exactly once delivery?
Hello, Saša

In section `8.3.5 Restart frequency` you denotes that Supervisor will terminate itself in case of maximum restart frequency exceedance

It’s important to keep in mind that a supervisor won’t restart a child process forever. The supervisor relies on the maximum restart frequency, which defines how many restarts are allowed in a given time period. By default, the maximum restart frequency is five restarts in five seconds. If this frequency is exceeded, the supervisor gives up and terminates itself.

Does that apply for GenServers that shutting down themselves by returning {:stop, reason, reply, new_state}?
What if :normal or :shutdown was specified as the stoppage reason?
Will it happen if those GenServers was spawn with temporary restart strategy?

The use-case on mind is following: there are a bunch of workers that are doing document export and if they are failing to do their job after N attempts (due to network errors mostly) they will exit they wait it will be logged and doesn't affect the parent supervisor.
OMG, thank you Saša for such a comprehensive answer!
I think "Reliably tested OTP patterns" can be a topic for your second book, akin to https://pragprog.com/book/nrtest2/rails-4-test-prescriptions
Hello, Saša!

First off let me express my gratitude for such an awesome book - it's very practical yet impressively transparent. Hard topics are explained in a very simple manner, which is quite amazing.

Right now I'm about to start an exercise 7.3.5: adding pooling and synchronizing DatabaseWorkers and upon examining the sources I couldn't pass by the comments you left in the https://github.com/sasa1977/elixir-in-action/blob/master/code_samples/ch07/persistable_todo_cache/lib/todo/cache.ex#L34

Can you please elaborate how does that help with testing? Previously I had a hard time testing GenServer services http://stackoverflow.com/questions/37873855/how-to-avoid-race-condition-during-testing-handle-cast-with-database-query/37875993#37875993 and maybe there your answer can give an insight that will ease that burden.