Your SlideShare is downloading. ×
0
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Introduction to Akka
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Introduction to Akka

1,439

Published on

The topconf 2013 introduction to actors with Akka

The topconf 2013 introduction to actors with Akka

0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,439
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
67
Comments
0
Likes
7
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. An introduction to Actors Akka with Johan Andrén johan.andren@mejsla.se | @apnylle
  • 2. Moores law 2,6 billions 1 million 2300 1971 1990 today
  • 3. Oh, No Problems!
  • 4. Oh No, Problems! • • • • • • Race conditions Data corruption Deadlocks Thread contention Livelocks Priority Inversion
  • 5. Concurrency is HARD • • • • To write To test To debug To reason about We need a better model!
  • 6. B C D A F E
  • 7. event driven systems with ACTORS
  • 8. State Inbox The only way to interact from outside Behaviour
  • 9. • • • • • Single execution flow model No shared _mutable_ state Lightweight Loose coupling Easy to test
  • 10. Actor A Actor B
  • 11. One way communication Actor A Actor B
  • 12. React, don’t wait Actor A Actor B
  • 13. Load balancing Actor A Actor B1 router Actor B2
  • 14. Pipe/Filter Actor A Actor F (filter) Actor B
  • 15. Parallellize Actor C1 Actor A Actor B (chef) Actor C2 Actor C2
  • 16. • • • No work, no thread used! Async - never actively wait Loose coupling
  • 17. JVM B C D A F E
  • 18. JVM 1 B C JVM 2 D A F E
  • 19. The same same • • • Two actors on one core Two actors on separate cores Two actors on separate servers
  • 20. Error handling in Actor systems
  • 21. Traditional model • • • Leaking information between tiers Impossible to detect simultaneous errors The receiver does not know how to handle the errors!
  • 22. Error handling with Actors (parent) Actor A Actor X Actor Z
  • 23. Error handling with Actors (parent) Actor A Actor X Actor Z
  • 24. Error handling with Actors Actor A Actor X Actor Z
  • 25. ”Supervision” • • • • Compartmentilization What goes back is explicit Separating error handling and business logic Can detect simultaneous errors
  • 26. But Wait, there is more! • • • • • STM Remoting Clustring with no SPoF MQs integration Eventbus Website: akka.io
  • 27. Try it out! Typesafe Activator typesafe.com
  • 28. Recap • • • • Simple but powerful model Lightweight and fast Loose coupling Resiliency Johan Andrén johan.andren@mejsla.se | @apnylle
  • 29. Questions? Johan Andrén johan.andren@mejsla.se | @apnylle

×