In this chapter, we introduced the actor paradigm. We used a real-world analogy, a software company and its employees, to correlate various terms used in the paradigm. There are reasons for using
ActorRef as a proxy to refer to an actor. We saw how let it crash and location transparency are realized due to the
ActorRef encapsulation, working as a proxy to the actual actor reference.
We covered the aspect of actors for state encapsulation. We also saw what actors are and how they map to threads. Next, we covered some essential and common actors patterns.
The become pattern is used for changing an actor's behavior. We saw how it helps in making the actor state immutable. Next, we saw how the supervision model works, so if an actor crashes, another copy is restarted.
Finally, we covered basic actor communication patterns such as
pipeTo. We also looked at the care needed when we use actors with future tasks.