The main idea of the actor model is to manage actors as primitives for parallel computing. An actor can send messages to other actors, receive and respond to messages, and spawn new actors.
The key idea here is to communicate through messages, rather than sharing memory between different threads.
It is important to add that the subjects are asynchronous and parallel, but they do not guarantee the order of the messages or the time limit as to when the message can be affected (therefore, atomic transactions cannot be divided into subjects).
Using the Actor model is suitable in two main cases:
- When you can decompose your decision into many independent tasks.
- When you can decompose your decision into a set of tasks related to a clear workflow.
Illustration:

Stas
source share