Supervise your akka actors 
Nicolas Jozwiak
Programmeur and agiliste! 
! 
@njozwiak
Contents 
•Context 
! 
•Why Akka and 
Scala ? 
! 
• Solution 
! 
•DevOps 
! 
• Issues and 
knowledges 
! 
•Results
Context
FTP 
Talend 
offers 
offer 
s 
Web Service 
offers 
syslog 
Logstash ElasticSearch UI result
Talend 
Web Service 
offers 
FTP 
1 Read FTP 
2 
Translate 
Xml in Jobs 
offers 
offer 
s 
3 Ask Web Service for diff 
4 S...
• Not happy customers 
• Lost process 
• Difficult to replay 
• Dashboard not 
efficient
• Business logic 
everywhere 
• Talend processing 
complex 
and not known 
• Approximate error 
handling 
• Slow integrati...
• Increase processing reliability 
• Centralize business logic 
• Enhance processing performance
Why Akka and Scala ?
Why Akka ? 
• Isolate business code in actors 
• Events to process 
• Fault tolerance 
• Supervision strategy 
• Performan...
Why Scala ? 
• Team knows Scala (a little) 
• Try Scala in the company 
• Scala with Akka rocks !
Solution
Web Service 
offers 
FTP 
1 
2 
3 
4 
Read FTP 
Translate 
Xml in Jobs 
offers 
Ask Web Service for diff 
Save 
TAakleknad...
Supervision 
• Every single actor has a default supervisor 
strategy 
•Means manage Actors failures 
• Send a notification...
Actor system 
Actor1 Actor2 
A D 
B C 
A 
Exception B C
MasterSupervisor 
FileSystem 
Supervisor 
FileCrawler 
Xml 
Supervisor 
XmlReader 
Posting Supervisor 
DiffActor 
Posting ...
DevOps
• No guarantee on message delivery 
• Have some metrics : 
‣ Logs 
‣Metrics with Graphite 
‣Ostrich (Twitter) 
‣ Kamon IO
• Endpoints access with Spray : 
‣ Statistics 
‣HealthCheck 
‣Workflow state
Issues & knowledges
• Actor system design 
• An actor with lots of processing 
• Unit testing 
• Actors and Futures
•Mind shift 
• Business events 
• Delegate to actors 
• Isolate business rules 
• Behaviour testing
• Domain Driven Design applied 
‣Make implicit concepts explicit 
‣ Aggregates
MasterSupervisor 
Xml 
Supervisor 
XmlReader 
DeadLetterListener 
Entry point 
Never call !
Results
• In production 
• Proactive way 
• New dashboard 
• Processing time 
•Web Service to optimize 
• FTP to remove
Conclusion
• Akka is very powerful 
‣Complex underlying notions 
‣Active ecosystem 
• KISS
Thank you 
for watching
Supervise your Akka actors
Supervise your Akka actors
Supervise your Akka actors
Supervise your Akka actors
Supervise your Akka actors
Prochain SlideShare
Chargement dans…5
×

Supervise your Akka actors

910 vues

Publié le

Vous avez entendu parler des acteurs Akka et vous vous demandez quels types d’architectures vous pouvez mettre en place, ou comment les intégrer dans votre architecture ? Et quelle est la courbe d’apprentissage ? A travers un retour d’expérience, nous répondrons à ces questions et vous montrerons comment en trois mois nous avons mis en place une architecture basée sur Akka et Spray en Scala.

Par Nicolas Jozwiak

Publié dans : Périphériques & matériel
0 commentaire
0 j’aime
Statistiques
Remarques
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

Aucun téléchargement
Vues
Nombre de vues
910
Sur SlideShare
0
Issues des intégrations
0
Intégrations
15
Actions
Partages
0
Téléchargements
17
Commentaires
0
J’aime
0
Intégrations 0
Aucune incorporation

Aucune remarque pour cette diapositive

Supervise your Akka actors

  1. 1. Supervise your akka actors Nicolas Jozwiak
  2. 2. Programmeur and agiliste! ! @njozwiak
  3. 3. Contents •Context ! •Why Akka and Scala ? ! • Solution ! •DevOps ! • Issues and knowledges ! •Results
  4. 4. Context
  5. 5. FTP Talend offers offer s Web Service offers syslog Logstash ElasticSearch UI result
  6. 6. Talend Web Service offers FTP 1 Read FTP 2 Translate Xml in Jobs offers offer s 3 Ask Web Service for diff 4 Save
  7. 7. • Not happy customers • Lost process • Difficult to replay • Dashboard not efficient
  8. 8. • Business logic everywhere • Talend processing complex and not known • Approximate error handling • Slow integration
  9. 9. • Increase processing reliability • Centralize business logic • Enhance processing performance
  10. 10. Why Akka and Scala ?
  11. 11. Why Akka ? • Isolate business code in actors • Events to process • Fault tolerance • Supervision strategy • Performance
  12. 12. Why Scala ? • Team knows Scala (a little) • Try Scala in the company • Scala with Akka rocks !
  13. 13. Solution
  14. 14. Web Service offers FTP 1 2 3 4 Read FTP Translate Xml in Jobs offers Ask Web Service for diff Save TAakleknad offer s
  15. 15. Supervision • Every single actor has a default supervisor strategy •Means manage Actors failures • Send a notification to its supervisor • Clean separation of processing and error handling
  16. 16. Actor system Actor1 Actor2 A D B C A Exception B C
  17. 17. MasterSupervisor FileSystem Supervisor FileCrawler Xml Supervisor XmlReader Posting Supervisor DiffActor Posting Service Syslog DeadLetterListener WorkStatus
  18. 18. DevOps
  19. 19. • No guarantee on message delivery • Have some metrics : ‣ Logs ‣Metrics with Graphite ‣Ostrich (Twitter) ‣ Kamon IO
  20. 20. • Endpoints access with Spray : ‣ Statistics ‣HealthCheck ‣Workflow state
  21. 21. Issues & knowledges
  22. 22. • Actor system design • An actor with lots of processing • Unit testing • Actors and Futures
  23. 23. •Mind shift • Business events • Delegate to actors • Isolate business rules • Behaviour testing
  24. 24. • Domain Driven Design applied ‣Make implicit concepts explicit ‣ Aggregates
  25. 25. MasterSupervisor Xml Supervisor XmlReader DeadLetterListener Entry point Never call !
  26. 26. Results
  27. 27. • In production • Proactive way • New dashboard • Processing time •Web Service to optimize • FTP to remove
  28. 28. Conclusion
  29. 29. • Akka is very powerful ‣Complex underlying notions ‣Active ecosystem • KISS
  30. 30. Thank you for watching

×