The Actor Model
The world around us moves in parallel very naturally. Each tree, plant, or person does their own thing, and occasionally they interact, and things change for the parties involved. So, we already have a mental model of how parallel programs could work: separate entities that encapsulate their behavior and communicate somehow, on an infrastructure that ensures proper synchronization.
This idea led to the creation of the Actor Model in 1973 by Carl Hewitt. This model splits a program into actors that can do three things:
- Send messages to other actors
- Create new actors
- Define the behavior for the next message the actor receives
Each actor has an address that’s conceptually similar to an email address, and actors can only communicate with the actors whose addresses they have. This address can be received in a message or obtained by creating a new actor.
The actor model separates the communication mechanism from the functionality of each...