Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Actor Model

Actor Model

A really brief introduction to Actor Model

Jun Lin

June 15, 2014
Tweet

More Decks by Jun Lin

Other Decks in Programming

Transcript

  1. Also influenced by • Lisp • Simula • Early versions

    of Smalltalk • Capability-based systems • Packet switching
  2. Response to message • Send a finite number of messages

    to other actors • Create a finite number of new actors • Designate the behavior to be used for the next message it receives.
  3. • You can decompose your problem into a set of

    independent tasks linked by a clear workflow • You want to be able to cancel jobs • You want to scale across threads and cores • You have a complex system that involves dependencies and shared state • You want to avoid the usage of explicit locks to protect shared state and actually make copies of that state (messages) and reacting to them locally • You want to code components that are intrinsically thread safe
  4. References • http://www.theerlangelist.com/2013/01/actors-in-erlangelixir.html?m=1 • http://learnyousomeerlang.com/starting-out-for-real • http://www.erlang.org/faq/getting_started.html#id51475 • http://savanne.be/articles/concurrency-in-erlang-scala/ •

    http://learnxinyminutes.com/docs/erlang/ • http://www.theerlangelist.com/2013/01/actors-in-erlangelixir.html?m=1 • http://media.pragprog.com/titles/elixir/ElixirCheat.pdf • http://elixir-lang.org/getting_started/1.html