Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
THE ACTOR
MODEL
WHO?
Mike Nash
- VP Capabilities
- BoldRadius Solutions
THE ACTOR MODEL
A model of computation
An architectural approach
Implementations
DR. CARL HEWITT
▸ Designed the Planner language
▸ "pattern-directed invokation from
assertions and goals"
▸ used in roboti...
DR. CARL HEWITT
▸ Languages
▸ Scheme
▸ ACT-1
▸ SALSA
▸ Caltrop
▸ ActorScript
THE ACTOR MODEL
A mathematical model of concurrent computation where...
▸ actors are the universal primitive of computatio...
THE ACTOR MODEL
Inspired by physics, general relativity and
quantum mechanics
Actor model theory explores theoretical topi...
RECEIVES MESSAGES
▸ Only way to interact with an actor is to send it
a message
▸ Messages should be immutable
▸ All comput...
SENDS MESSAGES
An actor can send messages to other actors
This is its only way to communicate
Messages are processed seque...
CREATES CHILD ACTORS
Actors create other actors to handle sub-tasks
Parent communicates with them via messages as
usual
CHANGES BEHAVIOR
An actor can change its behavior for subsequent
messages
This provides the basis for a finite state machi...
IMPLEMENTIONS
HARDWARE
Caltech Cosmic Cube
- 1981
- 64 Intel 8086/87 processors
- 6-dimensional hypercube network
HARDWARE
J-Machine
- 1988
- MIT VLSI Architecture group
- Designed for concurrent smalltalk and the
actor model
SOFTWARE
▸ Erlang
▸ Elixir
▸ Ada Tasks
▸ Pony
▸ Common Lisp Actors
▸ Akka
AKKA
A practical application of the Actor Model on the
JVM
Large ecosystem of related libraries
AKKA CORE
Actors within a single JVM
Written in Scala
Interoperable from Java, Clojure, Groovy
Use any JVM library
Support...
TESTKIT
▸ Allows asynchronous actors to be tested
synchronously
▸ Allows mock actors to be used as test probes
▸ Allows in...
AGENTS
▸ Encapsulate a single value
▸ Conflict free reads
▸ Queued writes
▸ Writes expressed as a function
(_ + 1)
AKKA REMOTING
▸ Actors in different JVMs can exchange
messages
▸ Pluggable serialization
▸ Pluggable transport
AKKA CLUSTER
▸ Builds on remoting
▸ Avoid fixed addressing
▸ Handles cluster membership
▸ Cluster-aware routers
▸ Cluster ...
AKKA CLUSTER SHARDING
▸ Builds on cluster
▸ Node affinity for messages
▸ No single point of failure
▸ Supports distributed...
AKKA DATA REPLICATION
▸ Supports automatic replication of data in a cluster
▸ Data must be represented with conflict-free ...
AKKA HTTP
▸ Expose actors to the web
▸ Client and server
▸ Routing
▸ Requests and responses as messages
▸ Includes HTTP Te...
AKKA STREAMS
▸ Solves the back-pressure problem
▸ DSL to define flows
▸ Sources and Sinks
▸ Akka HTTP builds on this
AKKA CONTRIB
▸ Community contributions to Akka
▸ Reliable proxy
▸ Message throttling
▸ Aggregators
▸ Receive pipeline
AKKA TYPED
▸ Next major version
▸ Actors support types
▸ Both messages and behaviors
▸ Under active development
CONCLUSION
The Actor model predates Akka
Akka provides the actor model on the JVM
Akka optionally provides remoting, clust...
Upcoming SlideShare
Loading in …5
×

Introduction to the Actor Model

Michael Nash's introduction to the Actor Model of computation for parallel and distributed systems, along with an implementation for the JVM, Akka.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to comment

Introduction to the Actor Model

  1. 1. THE ACTOR MODEL
  2. 2. WHO? Mike Nash - VP Capabilities - BoldRadius Solutions
  3. 3. THE ACTOR MODEL A model of computation An architectural approach Implementations
  4. 4. DR. CARL HEWITT ▸ Designed the Planner language ▸ "pattern-directed invokation from assertions and goals" ▸ used in robotics and AI ▸ The Actor Model ▸ Work spans 30 years ▸ Initial paper in 1973 with Peter Bishop and Richard Steiger ▸ In collaboration with MITs AI Lab
  5. 5. DR. CARL HEWITT ▸ Languages ▸ Scheme ▸ ACT-1 ▸ SALSA ▸ Caltrop ▸ ActorScript
  6. 6. THE ACTOR MODEL A mathematical model of concurrent computation where... ▸ actors are the universal primitive of computation ▸ An actor ▸ receives messages and acts on them ▸ sends messages
  7. 7. THE ACTOR MODEL Inspired by physics, general relativity and quantum mechanics Actor model theory explores theoretical topics in the actor model No shared state between actors Actors encapsulate state
  8. 8. RECEIVES MESSAGES ▸ Only way to interact with an actor is to send it a message ▸ Messages should be immutable ▸ All computation is in response to a message ▸ An actor is potential energy, a message turns it into kinetic energy
  9. 9. SENDS MESSAGES An actor can send messages to other actors This is its only way to communicate Messages are processed sequentially, concurrent to the sender
  10. 10. CREATES CHILD ACTORS Actors create other actors to handle sub-tasks Parent communicates with them via messages as usual
  11. 11. CHANGES BEHAVIOR An actor can change its behavior for subsequent messages This provides the basis for a finite state machine
  12. 12. IMPLEMENTIONS
  13. 13. HARDWARE Caltech Cosmic Cube - 1981 - 64 Intel 8086/87 processors - 6-dimensional hypercube network
  14. 14. HARDWARE J-Machine - 1988 - MIT VLSI Architecture group - Designed for concurrent smalltalk and the actor model
  15. 15. SOFTWARE ▸ Erlang ▸ Elixir ▸ Ada Tasks ▸ Pony ▸ Common Lisp Actors ▸ Akka
  16. 16. AKKA A practical application of the Actor Model on the JVM Large ecosystem of related libraries
  17. 17. AKKA CORE Actors within a single JVM Written in Scala Interoperable from Java, Clojure, Groovy Use any JVM library Supports pub/sub as well as point-to-point
  18. 18. TESTKIT ▸ Allows asynchronous actors to be tested synchronously ▸ Allows mock actors to be used as test probes ▸ Allows internal actor methods to be tested ▸ Allows asynchronous actors to be tested together
  19. 19. AGENTS ▸ Encapsulate a single value ▸ Conflict free reads ▸ Queued writes ▸ Writes expressed as a function (_ + 1)
  20. 20. AKKA REMOTING ▸ Actors in different JVMs can exchange messages ▸ Pluggable serialization ▸ Pluggable transport
  21. 21. AKKA CLUSTER ▸ Builds on remoting ▸ Avoid fixed addressing ▸ Handles cluster membership ▸ Cluster-aware routers ▸ Cluster singletons ▸ Auto fail-over ▸ Cluster events available
  22. 22. AKKA CLUSTER SHARDING ▸ Builds on cluster ▸ Node affinity for messages ▸ No single point of failure ▸ Supports distributed domain
  23. 23. AKKA DATA REPLICATION ▸ Supports automatic replication of data in a cluster ▸ Data must be represented with conflict-free replicated types ▸ Eventually consistent with short lag
  24. 24. AKKA HTTP ▸ Expose actors to the web ▸ Client and server ▸ Routing ▸ Requests and responses as messages ▸ Includes HTTP TestKit
  25. 25. AKKA STREAMS ▸ Solves the back-pressure problem ▸ DSL to define flows ▸ Sources and Sinks ▸ Akka HTTP builds on this
  26. 26. AKKA CONTRIB ▸ Community contributions to Akka ▸ Reliable proxy ▸ Message throttling ▸ Aggregators ▸ Receive pipeline
  27. 27. AKKA TYPED ▸ Next major version ▸ Actors support types ▸ Both messages and behaviors ▸ Under active development
  28. 28. CONCLUSION The Actor model predates Akka Akka provides the actor model on the JVM Akka optionally provides remoting, clustering and much more

×