...

/

Starting Per-User Processes with a Dynamic Supervisor

Starting Per-User Processes with a Dynamic Supervisor

Let's learn how to use dynamic supervisors to handle variable processes and establish some policies using a child spec.

Now we need to start a process per user. There are two reasons for doing this:

  • We don’t have a fixed number of processes to start.

  • We’ll also need to be able to look them up based on a user’s attributes.

Hence, we will need a structure that is a little more sophisticated. We will use a dynamic supervisor.

Properties and requirements of dynamic supervisors

Most supervisors create processes when an ...