Building a pool manager, part 2.3
September 8, 2018Starting multiple pools, using the Registry to locate pool supervisors and stop them.
We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Starting multiple pools, using the Registry to locate pool supervisors and stop them.
Preparing for multiple pools with the pools supervisor.
Remove static process names, provide the worker spec dynamically.
Make workers temporary and have the pool manager in charge of restarting them.
Handle worker deaths. (This is about OTP and not Human Resources...)
Use an ETS table to track client monitors.
Monitor client processes.
Implement worker checkin and checkout.
Make the worker supervisor start workers when it initializes.
Add the (dynamic) worker supervisor and have our pool supervisor start it; convert our code into an OTP application.
Implement the pool manager and have our pool supervisor start it.
Create a new mix project, add a worker and pool supervisor.
This series of posts will guide you in writing an OTP application that will manage pools of processes. In particular, it will do so using features introduced in Elixir 1.6 such as the DynamicSupervisor and the Registry.
How keeping your eye on the prize can keep you on the path to your end goal.