In Elixir, communication between processes is performed via message passing. Each process has a mailbox where messages from the "outside" world are placed, waiting to be processed. Once that happens, if a response is required, another message will be sent, and another mailbox will get a message!
To get started, go to the code repository where the
messages.ex file is located and open a new IEx terminal session. The IEx terminal session will also be an actor in this recipe! We will send messages from it to the process containing the code defined in the module.
Follow these steps to send messages between processes: