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.

Concurrency, Without the Pain: An Intro to Akka.NET @ Bay.NET

670 views

Published on

Concurrency, Without the Pain: An Intro to Akka.NET & the Actor Model with Andrew Skotzko

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Concurrency, Without the Pain: An Intro to Akka.NET @ Bay.NET

  1. 1. @petabridge Petabridge.com www.baynetug.org Concurrency, Without the Pain: An Intro to Akka.NET & the Actor Model with Andrew Skotzko
  2. 2. @petabridge Petabridge.com •  www.baynetug.org •  @baynetug / #BayNetUG •  An open and independent forum for evaluating and extending knowledge of .NET architecture, technologies, tools and business applications •  Monthly events (technical, business, networking) – Mountain View, San Francisco, Berkeley •  Working groups   Bay.NET User Group
  3. 3. @petabridge Petabridge.com .NET Community San Francisco SQL Server User Group meetup.com/The-San-Francisco-SQL-Server-Meetup-Group Azure Developers www.bayazure.org San Francisco F# h"p://www.meetup.com/sfsharp/
  4. 4. @petabridge Petabridge.com Coming Soon •  San Francisco: Hello DocumentDB – Tuesday, September 15th – Microsoft, 555 California St •  SouthBay.Net: Unit Testing Makes Me Faster: 8/27 – German International School of SV •  Silicon Valley Code Camp: 10/3-4 – Evergreen Valley College
  5. 5. @petabridge Petabridge.com Concurrency Without the Pain An Intro to Akka.NET & Actor Model #AkkaDotNet @ #BayNetUG Andrew  Skotzko   Co-­‐founder  —  Petabridge  
  6. 6. @petabridge Petabridge.com Why  should  we   care  about   concurrency?  
  7. 7. @petabridge Petabridge.com 1970  -­‐  2005  
  8. 8. @petabridge Petabridge.com
  9. 9. @petabridge Petabridge.com
  10. 10. @petabridge Petabridge.com
  11. 11. @petabridge Petabridge.com
  12. 12. @petabridge Petabridge.com
  13. 13. @petabridge Petabridge.com
  14. 14. @petabridge Petabridge.com TANSTAAFL   “There  ain’t  no  such  thing  as  a  free  lunch.”   —R.  A.  Heinlein,  The  Moon  Is  a  Harsh  Mistress  
  15. 15. @petabridge Petabridge.com What  the  hell  are   you  talking   about?  
  16. 16. @petabridge Petabridge.com Concurrency.   We  needs  it.  
  17. 17. @petabridge Petabridge.com So  why  is  this  hard?  
  18. 18. @petabridge Petabridge.com How to Write Multithreaded Code
  19. 19. @petabridge Petabridge.com Shared State Programming Sucks (Illustrated)
  20. 20. @petabridge Petabridge.com Random? •  .NET 4.0: TPL (2010) •  .NET 4.5: async/await (2012)
  21. 21. @petabridge Petabridge.com Is there a better way? THERE MUST BE! THERE.   MUST.   BE.   A.   BETTER.   WAY!  
  22. 22. @petabridge Petabridge.com Warning! Mind Blowingly Different Programming Style Ahead!
  23. 23. @petabridge Petabridge.com Warning! Mind Blowingly Different Programming Style Ahead!
  24. 24. @petabridge Petabridge.com The Actor Model
  25. 25. @petabridge Petabridge.com What  is  the  actor  model?  
  26. 26. @petabridge Petabridge.com Everything  is  an  actor.  
  27. 27. @petabridge Petabridge.com
  28. 28. @petabridge Petabridge.com
  29. 29. @petabridge Petabridge.com 3 Core Abilities 1.  Send  messages   2.  Create  other  actors   3.  Change  behavior  
  30. 30. @petabridge Petabridge.com Messages
  31. 31. @petabridge Petabridge.com Actors work by passing each other messages
  32. 32. @petabridge Petabridge.com Message passing in action
  33. 33. @petabridge Petabridge.com BUZZWORD   BINGO!  
  34. 34. @petabridge Petabridge.com Example Akka.NET Message
  35. 35. @petabridge Petabridge.com Actors send messages to addresses
  36. 36. @petabridge Petabridge.com Actor addresses have location transparency
  37. 37. @petabridge Petabridge.com Which means…
  38. 38. @petabridge Petabridge.com
  39. 39. @petabridge Petabridge.com
  40. 40. @petabridge Petabridge.com ReactiveManifesto.org
  41. 41. @petabridge Petabridge.com What is Akka.NET?
  42. 42. @petabridge Petabridge.com Battle-Tested (JVM)
  43. 43. @petabridge Petabridge.com This is an actor
  44. 44. @petabridge Petabridge.com These are messages
  45. 45. @petabridge Petabridge.com Actors run on threads
  46. 46. @petabridge Petabridge.com Actors are lazy
  47. 47. @petabridge Petabridge.com Process messages one at a time
  48. 48. @petabridge Petabridge.com The circle of life
  49. 49. @petabridge Petabridge.com
  50. 50. @petabridge Petabridge.com Hierarchies
  51. 51. @petabridge Petabridge.com Supervision
  52. 52. @petabridge Petabridge.com Switchable Behavior
  53. 53. @petabridge Petabridge.com And Can Form Highly Available Systems
  54. 54. @petabridge Petabridge.com What’s  this  give   me?  
  55. 55. @petabridge Petabridge.com Where can I use this? •  Analytics systems •  Marketing automation •  Multi-player games •  Device / IoT tracking •  Alerting & monitoring systems •  Recommendation engines •  Dynamic pricing •  Microservices •  Reactive UI
  56. 56. @petabridge Petabridge.com DEMO  
  57. 57. @petabridge Petabridge.com hZp://LearnAkka.net  
  58. 58. @petabridge Petabridge.com THANK YOU! Email:  andrew@petabridge.com     TwiZerz:     @askotzko   @AkkaDotNet  
  59. 59. @petabridge Petabridge.com Hierarchies pt. deux
  60. 60. @petabridge Petabridge.com Character Actor Pattern
  61. 61. @petabridge Petabridge.com ActorSelection == selection by address
  62. 62. @petabridge Petabridge.com Actor lifecycle
  63. 63. @petabridge Petabridge.com Actor lifecycle

×