Next: How SALSA Supports the
Up: Actor-Oriented Programming
Previous: Actor-Oriented Programming
Contents
The Actor Model
Actors [1] provide a flexible model of concurrency for open
distributed systems. Actors can be used to model traditional functional,
procedural, or object oriented systems. Actors are independent,
concurrent entities that communicate by exchanging messages
asynchronously. Each actor encapsulates a state and a thread of
control that manipulates this state. In response to a message,
an actor may perform one of the following actions (see Figure 2.1):
- Alter its current state, possibly changing its future behavior.
- Send messages to other actors asynchronously.
- Create new actors with a specified behavior.
- Migrate to another computing host.
Figure 2.1:
Actors are reactive entities. In response to a message, an
actor can (1) change its internal state, (2) send messages to peer actors,
(3) create new actors,
and/or (4) migrate to another computing host.
|
Actors receive messages not necessarily in the same order that they
were sent. All the received messages are initially buffered in the
receiving actor's message box before being processed.
Communication between actors is weakly fair: an actor infinitely
often ready to receive a message will eventually get it. An actor can
interact with another actor only if it has a reference to it. Actor
references are first class entities. They can be communicated in
messages to allow for arbitrary actor communication topologies.
Because actors can create arbitrarily new actors, the model supports
unbounded concurrency. Furthermore, because actors only communicate
through asynchronous message passing, in particular because there is
no shared memory, actor systems are highly reconfigurable.
Next: How SALSA Supports the
Up: Actor-Oriented Programming
Previous: Actor-Oriented Programming
Contents
Wei-Jen Wang
2006-10-14