Last active Jul 19, 2018

Carl Hewitt on Actors

Actor - Fundamental unit of computation, a computation model - not just a form of concurrency

An Actor has three essential elements:

1 - Processing - you have to get something done

2 - Storage - you have to be able to remember things

3 - Communication

Axioms - When an Actor receives a message what can it do:

I - Create more Actors

II - Send messages to other Actors that it has addresses for

III - Designate how the Actor is going to handle the next message it receives

Continuations are single threaded. Continuations are to decide what you’re going to do after you finish the current task.

Futures are Actors that have long computations. You can pass the Future around as a value while it is being computed.

For an Actor to send itself a message it can put the message in a future, send it to itself, and the system won’t deadlock.

The Actor gets to decide what it wants to do with incoming messages.
Example: A chicken Actor doesn’t have to agree to cut off its own head.

When an Actor’s state changes they don’t copy themselves. The Actor remains with its changed state.

Many to Many relationship among Actors and Addresses.

Your system will not know how many Addresses are behind an Actor or how many Actors share an Address.

Messages sent can arrive in any order. The system does not enforce this because guaranteeing order is expensive.

A message can only be delivered at most, once.

Nondeterministic (turing) vs Indeterministic (actors)
Ex: A message that increments a number and then sends the same message again. Another message, to stop and report the number is on its way. How many increments can happen before the stop message arrives.

The Actor model is more closely tied with physics. CSP is closely tied with algebra. CSP needs channels to be able to use algebra.

Synchronization is handled by only one message being handled at a time.

Arbiters

Not something you can make out of just and gates/or gates and other boolean components.

Equal number of outputs to inputs. The output order is not determined by the order of input.

Unbounded by processing time but the probability of output goes down exponentially as time goes on.

Mutated state isn’t for the current message. Mutated state is for the next message.