Chapter 2. Actors, Humans, and How We Live
Imagine a world where most people are glued to small, hand-held devices that let them send messages to other humans across oceans and continents... wait, we already live in this world!
With actors, it is much the same. The only way to contact a software actor is to send it a message, much like how we exchange text messages on mobile devices. As an example, consider a typical text message exchange between you and a friend. While commuting to work you text your friend and say “Good morning” (see Figure 2-1).

Figure 2-1. Actor messages are like text messages
After you send your friend a message and before she responds, you are free to do other things, such as sending text messages to other friends. It’s conceivable that you would also receive requests via text messages to perform other tasks, which may send you off to do other things and interact with other people.
Your friend may quickly see the message, and responds “Hello, how R U today?” (see Figure 2-2).

Figure 2-2. Actors behave like humans exchanging text messages
This is basically how messages between software actors behave. When an actor sends a message to another actor, it does not wait for a response; it is free to do other things, such as send messages to other actors.
When you send ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access