A word on dispatchers in Akka
Throughout some of the previous sections, I've mentioned the dispatcher within Akka. This is an extremely important component within Akka's actor system. In Akka's docs, they refer to it as the engine that makes the actor system tick, which I think is a very apt description. Since this component is so important, I want to touch on what it does a bit and also describe the different types and why you might use them.
Dispatchers and executors
The dispatcher in your actor system is responsible for assigning a thread to an actor instance so that it can do work. When an actor instance has no messages to process, it just sits there idle, not taking up any threads. This is why it's okay to have so many actor instances within your system at once (as long as they are not all trying to do work all the time). They don't take any resources, aside from a small amount of heap memory, unless they are processing a message.
Akka is an event-driven system...