All the Cloud’s a Stage and All the WebAssembly Modules Merely Actors
The actor model is a model for concurrent computation originally developed in 1973. This classic definition says that in response to a message, an actor may:
- Make local decisions
- Create more actors
- Send messages
- Determine how to respond to the next message
There are dozens of actor model implementations out there, from Akka to wasmCloud. One aspect of the model implementation differentiates wasmCloud from the majority. In this post, we’ll take a look at the notion of actors creating more actors and see why people have historically wanted this ability in their frameworks and how wasmCloud accomplishes the same goals but without manual supervision tree management.
For example, in Akka, the only way you can start an actor is inside an actor. There are a couple of pretty common use cases that revolve around spawning sub-actors or children. The first, and probably the most common, arises when an actor needs to spawn children to work on a task and then be able to dispose of those children when the task is complete.