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

The Actor Model: The Object Awakens

33ab5062beb333c981b7a1530024f7bc?s=47 Karmen Blake
January 19, 2016

The Actor Model: The Object Awakens

See how the actor model influenced object-oriented programming. And why concurrent-oriented programming is relevant for the future of programming.


Karmen Blake

January 19, 2016

More Decks by Karmen Blake

Other Decks in Programming


  1. The Actor Model Object

  2. Are we ready to write these kinds of apps?? Multicore

    by default Internet of Things Real-time Distributed Concurrent
  3. Are you willing to try a functional language? Higher Order

    functions No side effects Immutable data Lazy evaluation
  4. For now, lets look at… “Object Oriented Programming” (OOP)

  5. "OOP" Classes Objects Inheritance Interfaces Polymorphism Law of Demeter Patterns

    Whip Nae nae
  6. "OOP"

  7. “OOP" - Patterns

  8. "OOP"

  9. "OOP"

  10. OOP Alan Kay Defined Object-Oriented programming Invented the Smalltalk programming

  11. OOP "OOP to me means only messaging, local retention and

    protection and hiding of state- process, and extreme late binding of all things." “I invented the term object-oriented, and I can tell you that C++ wasn’t what I had in mind.“ - Alan Kay
  12. Actor Model

  13. Actor Model Invented by Hewitt, Baker, Agha in 1973 Everything

    is an actor and execution is concurrent.
  14. Actor Model

  15. Actor Model

  16. Actor Model Designed by motivation of highly parallel computing machines

    consisting of many independent microprocessors, each with its own local memory, communicating via high-performance network. - https://en.wikipedia.org/wiki/Actor_model
  17. Actor Model Actors + Message Passing Foundation for Asynchronous and

    Distributed Sysems Resilient and self-healing systems
  18. Actor Model

  19. Erlang did not invent the "Actor" model but did not

    take from it either. It arrived at its own best ways to solve problems. Erlang inventors did not hear about Actors until years later.
  20. None
  21. Concurrency

  22. Ruby

  23. Ruby

  24. “No concurrency library for Ruby can ever prevent the user

    from making thread safety mistakes (such as sharing a mutable object between threads and modifying it on both threads) or from creating deadlocks through incorrect use of locks.” - https://github.com/ruby-concurrency/concurrent-ruby
  25. “When the Ruby language was designed computers had only one

    CPU. Nowadays we have multiple cores and to utilize these we need concurrency. At this time Ruby can use other cores for IO operations, but for the rest Ruby can only execute code on one core at a time because of the global interpreter lock that is implemented in the language. This technique is in place to make sure the executed code and data is safe from modification so no unexpected behavior will occur.” - http://www.mangrove.com/en/journal/2015-11-17-whats-coming-in-ruby-3-and- rails-5/
  26. Ruby

  27. None
  28. None
  29. Ruby 3

  30. None
  31. None
  32. Concurrent-oriented programming Actor Model Thinking Brace Yourselves Internet of Things

    Distributed Resilient Systems
  33. None
  34. None
  35. References •http://akka.io •http://rvirding.blogspot.com/2008/01/virdings-first-rule-of-programming.html •http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented •https://en.wikipedia.org/wiki/Actor_model •https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition •https://twitter.com/yukihiro_matz/status/495219763883163648 •http://www.mangrove.com/en/journal/2015-11-17-whats-coming-in-ruby-3-and-rails-5/ •http://berb.github.io/diploma-thesis/original/resources/actors.svg •http://www.benjamin-erb.de/slides/da-talk1/assets/ill/actors.svg

    •http://web.cs.ucla.edu/~palsberg/course/cs239/papers/karmani-agha.pdf •https://pbs.twimg.com/media/CMCL9UUWoAAEw1k.png •https://i.ytimg.com/vi/ny5vGbTfB8c/maxresdefault.jpg •https://upload.wikimedia.org/wikipedia/commons/7/76/Alan_Kay_(3097597186).jpg •https://imagery.pragprog.com/products/340/pb7con.jpg?1381427917