Defining and starting a supervisor

We'll now see an example of a supervisor. For now, we'll put the CacheWorker module to the side, as that will be used in the next section, where we'll be using dynamic supervisors. In this example, we'll be creating the upload pipeline supervisor. In our application, we'll create two pipelines, one for downloads and another for uploads, which will be used when a user of our application performs the respective action. These pipelines contain a set of steps that will be executed for every download or upload operation. One of these steps is the encryption/decryption step, which will encrypt the uploaded file before saving it on remote storage, and decrypt the downloaded file.

The modules we'll be showing in ...

Get Mastering Elixir now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.