Let’s briefly recap. In that last example, we ran our OTP sequence application using mix. Looking at just our code, we see that a supervisor process and two worker processes got started. These were knitted together so our system continued to run with no loss of state even if the worker that we talked to crashed. And any other Erlang process on this node (including IEx itself) can talk to our sequence application and enjoy its stream of freshly minted integers.
You probably noticed that the start function takes two parameters. The second corresponds to the value we specified in the mod: option in the mix.exs file (in our case, the counter’s initial value). The first parameter specifies the status of the restart, which we’re not going to get into, because…