December 2019
Intermediate to advanced
248 pages
5h 34m
English
This chapter covered a lot of ground. First, we formed a strategy to incorporate lifecycle management into our application. We planned a single QuizManager and one QuizSession per user. We decided to use a registry to name the processes so that workers could find them as needed.
Next, we built in the requisite start links into our QuizManager and automated the start and supervision in application.ex. We tried it in IEx to verify that it automatically started.
We then built the machinery for dynamic supervision into our QuizSession, including the child spec, the start link and the take_quiz function to invoke the supervisor to create the process. We used the observer to look at our processes in action and ...
Read now
Unlock full access