Actor Model

The Actor Model ( German Model actuators ) is in computer science, a model for concurrent bills or programs. These are divided into concurrent units, so-called actuators that communicate solely via message exchange. It was first described in 1973 by Carl Hewitt, Peter Bishop, and Richard Steiger. Use is the Actor model today including in the programming languages ​​Erlang, Io and Scala.


Actuators are concurrent units which do not have a shared memory area, but only communicate via messages. The encapsulation of the state of the actuator is similar to the principle of encapsulation in object-oriented programming. Each actuator has an inbox, an address and a behavior.

The receipt of a message is called an event. Received messages are initially stored in the Inbox. The actuator processes the messages contained therein, according to the FIFO principle. The behavior of the actuators describes reactions to messages depending on their structure. Actuators can perform three different reactions:

  • Send messages to yourself or other actuators.
  • Create new actuators.
  • Modifying your own behavior.

The message exchange is asynchronous, that is, the sender of a message can proceed immediately after submitting with other promotions and not have to wait until the receiver accepts the message. The Actor model does not specify how long can the mediation of a message. It is only defined that each message after a finite time must arrive at the receiver. Furthermore, messages need not necessarily arrive they are shipped in the same order. The latter is guaranteed in many implementations anyway.


The fact that actuators at a time only process a message and no other concurrent process may affect the internal memory area of an actuator causes the programming within the actuator is purely sequential. Assumptions that were made ​​on the basis of the internal state of the actuator to the start of the processing of a message to remember about the entire processing of the message still valid. This is different, the Actor model is fundamentally different from classical and popular shared-memory concurrency approaches, where all concurrent threads access a shared memory area and this is protected in parts over locking primitives such as semaphores, mutexes and signal.


Since actuators do not have a common memory area, set both the messages and the internal memory area of another actor a copy of specific values ​​dar. Thus is the same information several times in the store before, resulting in an increased memory requirements. In addition, sending, place it in the mailbox and processing faces a message at the Actor model, a ( statically bound in the best case ) function call in the shared state concurrency. The expense is thus substantially increases the Actor model.


The Actor model is widely used in functional programming languages ​​. It provides the basic model for concurrency in the programming language Erlang represents a further spread receives the model by languages ​​with mixed paradigms such as Scala. Even for classical imperative programming languages ​​exist implementations of the Actor model, such as Theron Actor library for C .