Now, we can implement the final piece of the puzzle—the shop boy and the sendBoy function that we left uncovered until now. The Boy does not belong to the Bakery. The Manager will need to send the Boy to the grocery Store, which is represented by another actor system.
In order to do so, we'll rely on Akka's location transparency and remote capabilities. First, the manager will deploy a boy actor to the remote system. The deployed actor will get a reference to the Seller actor in the store so that it can get groceries as and when required.
There are two ways to use remoting in Akka—either by using actor lookup or actor creation. Both are used in the same way that we did locally until now, that is, by calling actorSelection and ...