Working with actor systems
The strength of the actor model is that actors are lightweight, which means you can use millions of them on a single JVM running on an ordinary computer. Most of the time, you are not going to use a single actor but many actors. This requires a model to handle multiple actors.
In Akka, actors are organized in hierarchical trees—meaning that every actor has a parent and can have multiple children. Next, we will have a look at a slightly more complicated example that will showcase how actors work in hierarchies.
Task specification
Imagine we need to have multiple actors that all output a greeting to a given name to the log. Imagine also that we need to abstract away the fact that there are multiple actors in the system from the end user. We are going to do so by creating a single supervising actor that is going to be in charge of the execution of all its child actors. The child actors will be the actors that output the greeting message to the log, and the parent actor...