Class Actor notes

Inventor of actor model: Carl Hewitt

-Actor is a primitive unit that embodies all fundamental elements of computation needs.

  • Processing: Get something done
  • Storage: Be able to remember things
  • Communication:

-You cannot have just one actors. A system of actors that can communicate with each other make up actors.

-Fundamental properties of actor

  • Everything is an actor
  • Then you are recursed to no end
  • But the actor end in axioms
  • What can an actor do:
    • Create another actor,
    • Send message to other actors
    • Designate how its going to handle the next message
  • Process one message at a time:
    • Implement a pipeline to take message queue
    • If messages in pipeline are all the same, process it all at once.
  • Idea of a futures contract:
    • While its processing something you can buy a future to process in it
    • If it breaks, the futures contract breaks
    • So you can send this future to yourself and you don’t get a deadlock for sending message to yourself.
    • So you can get the future immediately and pass it around and store it
  • Is address equivalent to identity?
    • No because you can have one address for a bunch of actors replicated behind the scenes
    • It could be a message box that forwards to a bunch of other actors
  • On Addresses
    • All you can do with an address is send a message
    • CLR enforces address integrity
    • Between the machines, you use encryption
    • Cannot take an integer and cast it to an object
    • It is too expensive on the system to maintain sequential time messaging arrival. Just like internet packets
    • Addresses are like capabilities
    • Messages are sent via best effort
    • There are no channels, if you want it, it’ll be another actor
  • Messaging is indeterministic: they sort themselves out
    • Start mesage
    • Go message, stop message
    • Consider the case of sending myself a message
    • If I get a go message, I increment the counter by one and send a go message
    • Synchronization is built into the fact that one message is handled at a time. In the order they arrived. Like a checking account
    • This is where the arbitor comes in
    • If I get a stop message, then I report what the count is
  • Arbitors
    • Arbitors cannot be made out of AND gates and OR gates
    • 2 inputs i1 and i2.
    • 2 outputs o1 and o2
    • Allowed to put in i1 and i2 at the same time, but only 1 can come out of outputs
    • An arbitor may take however long it needs to decide, but it must decide
    • It is used to decide which inputs came in first.
  • Assignment:
    • In the checking account example: Actor returns the balance and also, the balance+ deposit
    • So the answer and the assignment as well.
  • You can’t enforce consistency. There’s no way to compute truth in absolute term
  • You can not get a global picture, so only a local situation.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>