Akka is a very rich ecosystem, far too rich to do it justice in a single chapter. There are some important parts of the toolkit that you will need, but we have not covered them here. We will give brief descriptions, but you can refer to the Akka documentation for more details:
?
, offers an alternative to the tell operator, !
, that we have used to send messages to actors. Unlike "tell", which just fires a message to an actor, the ask operator expects a response. This is useful when we need to ask actors questions rather than just telling them what to do. The ask pattern is documented at http://doc.akka.io/docs/akka/snapshot/scala/actors.html#Ask__Send-And-Receive-Future.context.become
to switch between them. Akka offers a more powerful alternative, based on finite state machines, to encode a more complex set of states and transitions: http://doc.akka.io/docs/akka/snapshot/scala/fsm.html.