Skip to content

Instantly share code, notes, and snippets.

@rjattrill
Created October 1, 2015 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjattrill/f6c226a868d67010a7a6 to your computer and use it in GitHub Desktop.
Save rjattrill/f6c226a868d67010a7a6 to your computer and use it in GitHub Desktop.
An overview of the Actors programming model

An Overview of Actors

Source: https://channel9.msdn.com/Shows/Going+Deep/Hewitt-Meijer-and-Szyperski-The-Actor-Model-everything-you-wanted-to-know-but-were-afraid-to-ask

Definition

An Actor is a fundamental unit of computation.

An actor can do:

* processing
* storage (state)
* communication

Actors exist within a system

Axioms

When an actor receives a message it can:

* create more actors
* send messages to existing actors that it knows
* designate what to do with the next message it will receive (in the examples given, this was to update internal state)

Addressing

Actors have a many to many relationship with addresses

* Addresses are assigned by the system framework on machine
* Between machines use encryption

Addresses are like 'capabilities'

Messages

* Delivery order not guaranteed
	** If you need a certain delivery order, create another actor called a 'sequence' and send that.
* Delivery not guaranteed - best efforts
	** Sender may wish to persist and resend if ACK not received
* Message is delivered at most once
* There are no channels

Determinancy

Non-determinancy: random Indeterminancy: We don't know the answer until it happens

The actor programming model supports indeterminancy

Arbiter

* Two inputs, possibly simultaneous
* Two possible outputs, but only one possible outcome - the ball is in or out

cf: Petri-net

Actors are a Programming Model

Actors are an alternative programming model:

* Functional programming cannot solve / model some problems
* Turing machine cannot solve / model some problems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment