Actor Model: Difference between revisions
(→Actor) |
|||
Line 28: | Line 28: | ||
An actor has an address, so other actor can send messages to it. | An actor has an address, so other actor can send messages to it. | ||
From a programming model perspective, an actor can be thought as an object with access to its own private state no-one else has access to, and its own thread. | |||
==Message== | ==Message== |
Revision as of 17:57, 31 May 2018
External
- https://en.wikipedia.org/wiki/Actor_model
- https://en.wikipedia.org/wiki/Actor_model_theory
- https://en.wikipedia.org/wiki/Message_passing
- http://www.brianstorti.com/the-actor-model/
- https://anthonylebrun.silvrback.com/actors-vs-objects
Internal
Overview
The actor model is a mathematical model for concurrent computation. The model's primitive is the actor, which is an entity that sends and receives messages. The essence of the model is that individual actors maintain state independently of each other and passing messages to each other. In response to a message, an actor can make local decisions, create more actors, send more messages and determine how to respond to the next message received. Actors may modify their own private state, but they can affect each others through messages, avoiding the needs for any locks.
Concepts
Actor
An actor is a computation unit that maps each received message to:
- a finite set of messages sent to other actors.
- a new behavior - which will govern the response to the next messages.
- a finite set of new actors created.
The actor embodies all three essential elements of computation: processing, storage and communication.
An actor has an address, so other actor can send messages to it.
From a programming model perspective, an actor can be thought as an object with access to its own private state no-one else has access to, and its own thread.