Chapter 6. Fault tolerance with Supervisors
This chapter covers
- Using the OTP Supervisor behavior
- Working with Erlang Term Storage (ETS)
- Using Supervisors with normal processes and other OTP behaviors
- Implementing a basic worker-pool application
In the previous chapter, you built a naïve Supervisor made from primitives provided by the Elixir language: monitors, links, and processes. You should now have a good understanding of how Supervisors work under the hood.
After teasing you in the previous chapter, in this chapter I’ll finally show you how to use the real thing: the OTP Supervisor behavior. The sole responsibility of a Supervisor is to observe an attached child process, check to see if it goes down, and take some action if that happens. ...