SlideShare a Scribd company logo
1 of 14
Akka 101
Actor based concurrency framework
What is akka?
Event Driven
Asynchronous
Distributed
Reactive
Responsive: Respond in timely manner if possible
Resilient: Responsive in case of failure
Why Akka?
Actors
Light weight object (around 300 bytes of memory)
Accept messages and do whatever they are supposed to do with them
Process one message at a time
Each actor has messaging queue
Asynchronous
Serializable and passed to other clients/actors
Why actors, why not threads
Concurrency : When two threads are making progress. Parallelism that can
include time slicing.
Parallelism: When two threads are executing simultaneously.
Shared states are real evil. Can cause race condition, dead locks, blocking
calls.
Actors keep mutable state internal.
Actors communicate through messages. No shared state between outside
Message Passing
Fire and forget
Send and wait
Send and reply using future
Akka Components
ActorSystem: Actor, ActorRef, MessageDispatcher, Mailbox, Message Queue.
ActorRef: Addressable destination of actor
MessageDispatcher:
Engine that runs parts of actor system and schedule all activity. Main responsibility to run
mailbox.
ActorRef -> MessageDispatcher -> MessageQueue of destination mailbox
Mailbox: Hold actors. Takes message from message queue and invokes a
actor.
Actor Hierarchies and path
All actors belong to actor hierarchies in actor system.
Two separate hierarchies:
System Hierarchies : Manage internal tasks
User hierarchies : Defines actor for our application
User level root actor (named Guardian) under which all actors are created.
Actor Path: akka://MySystem@MyServer:MyPort/user/TopActor/ChildActor
akka is the name of the scheme
Supervise
Actor can supervise other actors
Supervisor detects and respond to failures
On actor crash, a notification is send to its supervisor to decide what to do
Helps provide clean separation between error handling and message
processing
Fault handling strategy:
Supervision and Monitoring
Every actor has a supervisor who created the current one.
Responsible for watching its subordinates and handling their problem.
Actor detects failure and suspend itself. Supervisor helps by :
Resume its subordinate
Restart the subordinate
Terminate permanently
Escalate the failure to its supervisor
Routers
Type of actor
Layer between ActorRef and Actor
Route Message to underlying actor
Non cluster example:
Round robin
Consistent hashing
Random etc
Use case
Processing pipeline
Streaming data
Multi-user concurrency (as one actor run at one time)
Systems high uptime requirement (Supervisor make sure actor is live)
Application with shared state
Thanks!
References
https://media.itm.uni-luebeck.de/teaching/ws2012/sem-sse/martin-thurau-
akka.io.pdf
http://akka.io/docs/

More Related Content

What's hot

Actors and Threads
Actors and ThreadsActors and Threads
Actors and Threadsmperham
 
The Actor Model - Towards Better Concurrency
The Actor Model - Towards Better ConcurrencyThe Actor Model - Towards Better Concurrency
The Actor Model - Towards Better ConcurrencyDror Bereznitsky
 
Introduction to Akka
Introduction to AkkaIntroduction to Akka
Introduction to AkkaKnoldus Inc.
 
Introduction to actor model with examples on Akka.NET
Introduction to actor model with examples on Akka.NETIntroduction to actor model with examples on Akka.NET
Introduction to actor model with examples on Akka.NETArthur Shvetsov
 
Reactive applications with Akka.Net - DDD East Anglia 2015
Reactive applications with Akka.Net - DDD East Anglia 2015Reactive applications with Akka.Net - DDD East Anglia 2015
Reactive applications with Akka.Net - DDD East Anglia 2015Anthony Brown
 
The dark side of Akka and the remedy
The dark side of Akka and the remedyThe dark side of Akka and the remedy
The dark side of Akka and the remedykrivachy
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupApcera
 
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET ActorsFull-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actorspetabridge
 
Concurrency in Smalltalk -- Beyond Threads
Concurrency in Smalltalk -- Beyond ThreadsConcurrency in Smalltalk -- Beyond Threads
Concurrency in Smalltalk -- Beyond ThreadsESUG
 
Introduction to Functional Reactive Programming
Introduction to Functional Reactive ProgrammingIntroduction to Functional Reactive Programming
Introduction to Functional Reactive ProgrammingĐặng Thái Sơn
 
Scala Italy 2015 - An Introduction to Akka and the Actor Based Model
Scala Italy 2015 - An Introduction to Akka and the Actor Based ModelScala Italy 2015 - An Introduction to Akka and the Actor Based Model
Scala Italy 2015 - An Introduction to Akka and the Actor Based ModelDaniela Sfregola
 
C#: Understanding ConfigureAwait(false)
C#: Understanding ConfigureAwait(false)C#: Understanding ConfigureAwait(false)
C#: Understanding ConfigureAwait(false)Shuhei Eda
 
Intro to elixir and phoenix
Intro to elixir and phoenixIntro to elixir and phoenix
Intro to elixir and phoenixJared Smith
 
CSP: Huh? And Components
CSP: Huh? And ComponentsCSP: Huh? And Components
CSP: Huh? And ComponentsDaniel Fagnan
 
Project Orleans - Actor Model framework
Project Orleans - Actor Model frameworkProject Orleans - Actor Model framework
Project Orleans - Actor Model frameworkNeil Mackenzie
 
Akka - young fighter course
Akka - young fighter courseAkka - young fighter course
Akka - young fighter courseDmitriy Gutman
 

What's hot (20)

Actors and Threads
Actors and ThreadsActors and Threads
Actors and Threads
 
The Actor Model - Towards Better Concurrency
The Actor Model - Towards Better ConcurrencyThe Actor Model - Towards Better Concurrency
The Actor Model - Towards Better Concurrency
 
Introduction to Akka
Introduction to AkkaIntroduction to Akka
Introduction to Akka
 
Introduction to actor model with examples on Akka.NET
Introduction to actor model with examples on Akka.NETIntroduction to actor model with examples on Akka.NET
Introduction to actor model with examples on Akka.NET
 
Introduction to the Actor Model
Introduction to the Actor ModelIntroduction to the Actor Model
Introduction to the Actor Model
 
Reactive applications with Akka.Net - DDD East Anglia 2015
Reactive applications with Akka.Net - DDD East Anglia 2015Reactive applications with Akka.Net - DDD East Anglia 2015
Reactive applications with Akka.Net - DDD East Anglia 2015
 
The dark side of Akka and the remedy
The dark side of Akka and the remedyThe dark side of Akka and the remedy
The dark side of Akka and the remedy
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder Meetup
 
Driver
DriverDriver
Driver
 
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET ActorsFull-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
 
Akka Actors
Akka ActorsAkka Actors
Akka Actors
 
Concurrency in Smalltalk -- Beyond Threads
Concurrency in Smalltalk -- Beyond ThreadsConcurrency in Smalltalk -- Beyond Threads
Concurrency in Smalltalk -- Beyond Threads
 
Introduction to Functional Reactive Programming
Introduction to Functional Reactive ProgrammingIntroduction to Functional Reactive Programming
Introduction to Functional Reactive Programming
 
Scala Italy 2015 - An Introduction to Akka and the Actor Based Model
Scala Italy 2015 - An Introduction to Akka and the Actor Based ModelScala Italy 2015 - An Introduction to Akka and the Actor Based Model
Scala Italy 2015 - An Introduction to Akka and the Actor Based Model
 
Actor Model & Reactive Manifesto
Actor Model & Reactive ManifestoActor Model & Reactive Manifesto
Actor Model & Reactive Manifesto
 
C#: Understanding ConfigureAwait(false)
C#: Understanding ConfigureAwait(false)C#: Understanding ConfigureAwait(false)
C#: Understanding ConfigureAwait(false)
 
Intro to elixir and phoenix
Intro to elixir and phoenixIntro to elixir and phoenix
Intro to elixir and phoenix
 
CSP: Huh? And Components
CSP: Huh? And ComponentsCSP: Huh? And Components
CSP: Huh? And Components
 
Project Orleans - Actor Model framework
Project Orleans - Actor Model frameworkProject Orleans - Actor Model framework
Project Orleans - Actor Model framework
 
Akka - young fighter course
Akka - young fighter courseAkka - young fighter course
Akka - young fighter course
 

Viewers also liked

Akka -- Scalability in Scala and Java
Akka -- Scalability in Scala and JavaAkka -- Scalability in Scala and Java
Akka -- Scalability in Scala and JavaNadav Wiener
 
Ph D Proposal, Cloud Computing Security
Ph D Proposal, Cloud Computing SecurityPh D Proposal, Cloud Computing Security
Ph D Proposal, Cloud Computing SecurityZhi Guan
 
3d Max Render 01 Raytrace Skylight
3d Max Render 01 Raytrace Skylight3d Max Render 01 Raytrace Skylight
3d Max Render 01 Raytrace Skylightlab_digital
 
Curriculum vitae
Curriculum vitaeCurriculum vitae
Curriculum vitaeSara_20
 
Qué obtiene una institución que se afilia a red pa paz doc.docx
Qué obtiene una institución que se afilia a red pa paz doc.docxQué obtiene una institución que se afilia a red pa paz doc.docx
Qué obtiene una institución que se afilia a red pa paz doc.docxRed PaPaz
 
Analisis de problemas de manejos de los materiales
Analisis de problemas de manejos de los materialesAnalisis de problemas de manejos de los materiales
Analisis de problemas de manejos de los materialesraimer_1987
 
Arete Industries Research Report
Arete Industries Research ReportArete Industries Research Report
Arete Industries Research ReportThe WSR Group
 
Clase 10 CSyP
Clase 10 CSyPClase 10 CSyP
Clase 10 CSyPTensor
 
Cv Interim English
Cv Interim EnglishCv Interim English
Cv Interim Englishmroseeu
 
Odontología Neurofocal
Odontología NeurofocalOdontología Neurofocal
Odontología NeurofocalDamarisdlgd8
 
Berita Paroki 06-07 Februari 2016
Berita Paroki 06-07 Februari 2016Berita Paroki 06-07 Februari 2016
Berita Paroki 06-07 Februari 2016karangpanas
 
Presentasi BRI Prioritas (3 agustus 2013)
Presentasi BRI Prioritas (3 agustus 2013)Presentasi BRI Prioritas (3 agustus 2013)
Presentasi BRI Prioritas (3 agustus 2013)lia_aluyah
 
150309 presentación innovación sostenible eoi healc
150309 presentación innovación sostenible eoi healc150309 presentación innovación sostenible eoi healc
150309 presentación innovación sostenible eoi healcAngel Alba Pérez
 
Finanças dos clubes brasileiros em 2015- Amir Somoggi
Finanças dos clubes brasileiros em 2015- Amir SomoggiFinanças dos clubes brasileiros em 2015- Amir Somoggi
Finanças dos clubes brasileiros em 2015- Amir SomoggiAmir Somoggi
 
Seminario mandos intermedios
Seminario mandos intermediosSeminario mandos intermedios
Seminario mandos intermediosJavier Alma
 
Proteccion del medioambiente Ramos Luis
Proteccion del medioambiente   Ramos LuisProteccion del medioambiente   Ramos Luis
Proteccion del medioambiente Ramos Luisluisramos206
 

Viewers also liked (20)

Akka -- Scalability in Scala and Java
Akka -- Scalability in Scala and JavaAkka -- Scalability in Scala and Java
Akka -- Scalability in Scala and Java
 
Ph D Proposal, Cloud Computing Security
Ph D Proposal, Cloud Computing SecurityPh D Proposal, Cloud Computing Security
Ph D Proposal, Cloud Computing Security
 
3d Max Render 01 Raytrace Skylight
3d Max Render 01 Raytrace Skylight3d Max Render 01 Raytrace Skylight
3d Max Render 01 Raytrace Skylight
 
Curriculum vitae
Curriculum vitaeCurriculum vitae
Curriculum vitae
 
Qué obtiene una institución que se afilia a red pa paz doc.docx
Qué obtiene una institución que se afilia a red pa paz doc.docxQué obtiene una institución que se afilia a red pa paz doc.docx
Qué obtiene una institución que se afilia a red pa paz doc.docx
 
Analisis de problemas de manejos de los materiales
Analisis de problemas de manejos de los materialesAnalisis de problemas de manejos de los materiales
Analisis de problemas de manejos de los materiales
 
Arete Industries Research Report
Arete Industries Research ReportArete Industries Research Report
Arete Industries Research Report
 
fresh Credentials
fresh Credentialsfresh Credentials
fresh Credentials
 
Clase 10 CSyP
Clase 10 CSyPClase 10 CSyP
Clase 10 CSyP
 
Cv Interim English
Cv Interim EnglishCv Interim English
Cv Interim English
 
Odontología Neurofocal
Odontología NeurofocalOdontología Neurofocal
Odontología Neurofocal
 
Berita Paroki 06-07 Februari 2016
Berita Paroki 06-07 Februari 2016Berita Paroki 06-07 Februari 2016
Berita Paroki 06-07 Februari 2016
 
Presentasi BRI Prioritas (3 agustus 2013)
Presentasi BRI Prioritas (3 agustus 2013)Presentasi BRI Prioritas (3 agustus 2013)
Presentasi BRI Prioritas (3 agustus 2013)
 
150309 presentación innovación sostenible eoi healc
150309 presentación innovación sostenible eoi healc150309 presentación innovación sostenible eoi healc
150309 presentación innovación sostenible eoi healc
 
Galleta de soda
Galleta de sodaGalleta de soda
Galleta de soda
 
Finanças dos clubes brasileiros em 2015- Amir Somoggi
Finanças dos clubes brasileiros em 2015- Amir SomoggiFinanças dos clubes brasileiros em 2015- Amir Somoggi
Finanças dos clubes brasileiros em 2015- Amir Somoggi
 
Seminario mandos intermedios
Seminario mandos intermediosSeminario mandos intermedios
Seminario mandos intermedios
 
Proteccion del medioambiente Ramos Luis
Proteccion del medioambiente   Ramos LuisProteccion del medioambiente   Ramos Luis
Proteccion del medioambiente Ramos Luis
 
Presentación del Especialista Consultor del Hospital Niño Jesús
Presentación del Especialista Consultor del Hospital Niño JesúsPresentación del Especialista Consultor del Hospital Niño Jesús
Presentación del Especialista Consultor del Hospital Niño Jesús
 
Haba
HabaHaba
Haba
 

Similar to Akka framework

Akka Actors: an Introduction
Akka Actors: an IntroductionAkka Actors: an Introduction
Akka Actors: an IntroductionRoberto Casadei
 
Nairobi JVM meetup : Introduction to akka
Nairobi JVM meetup : Introduction to akkaNairobi JVM meetup : Introduction to akka
Nairobi JVM meetup : Introduction to akkaAD_
 
Discovering the Service Fabric's actor model
Discovering the Service Fabric's actor modelDiscovering the Service Fabric's actor model
Discovering the Service Fabric's actor modelMassimo Bonanni
 
Reactive programming with akka
Reactive programming with akkaReactive programming with akka
Reactive programming with akkaWebdesign Factory
 
Oop2011 actor presentation_stal
Oop2011 actor presentation_stalOop2011 actor presentation_stal
Oop2011 actor presentation_stalMichael Stal
 
GPars (Groovy Parallel Systems)
GPars (Groovy Parallel Systems)GPars (Groovy Parallel Systems)
GPars (Groovy Parallel Systems)Gagan Agrawal
 
Building reactive systems with Akka
Building reactive systems with AkkaBuilding reactive systems with Akka
Building reactive systems with AkkaKristof Jozsa
 
Reactive programming with akka
Reactive programming with akka Reactive programming with akka
Reactive programming with akka Sovon Nath
 
Reactive Programming in Akka
Reactive Programming in AkkaReactive Programming in Akka
Reactive Programming in AkkaDevFest DC
 
Architectural patterns part 4
Architectural patterns part 4Architectural patterns part 4
Architectural patterns part 4assinha
 
Reactive Programming in .Net - actorbased computing with Akka.Net
Reactive Programming in .Net - actorbased computing with Akka.NetReactive Programming in .Net - actorbased computing with Akka.Net
Reactive Programming in .Net - actorbased computing with Akka.NetSören Stelzer
 
Building Massively Scalable application with Akka 2.0
Building Massively Scalable application with Akka 2.0Building Massively Scalable application with Akka 2.0
Building Massively Scalable application with Akka 2.0Knoldus Inc.
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_groupSkills Matter
 
Discovering the Service Fabric's actor model
Discovering the Service Fabric's actor modelDiscovering the Service Fabric's actor model
Discovering the Service Fabric's actor modelMassimo Bonanni
 

Similar to Akka framework (20)

Akka Actors: an Introduction
Akka Actors: an IntroductionAkka Actors: an Introduction
Akka Actors: an Introduction
 
Nairobi JVM meetup : Introduction to akka
Nairobi JVM meetup : Introduction to akkaNairobi JVM meetup : Introduction to akka
Nairobi JVM meetup : Introduction to akka
 
Discovering the Service Fabric's actor model
Discovering the Service Fabric's actor modelDiscovering the Service Fabric's actor model
Discovering the Service Fabric's actor model
 
Reactive programming with akka
Reactive programming with akkaReactive programming with akka
Reactive programming with akka
 
Oop2011 actor presentation_stal
Oop2011 actor presentation_stalOop2011 actor presentation_stal
Oop2011 actor presentation_stal
 
Introducing Akka
Introducing AkkaIntroducing Akka
Introducing Akka
 
GPars (Groovy Parallel Systems)
GPars (Groovy Parallel Systems)GPars (Groovy Parallel Systems)
GPars (Groovy Parallel Systems)
 
Building reactive systems with Akka
Building reactive systems with AkkaBuilding reactive systems with Akka
Building reactive systems with Akka
 
Akka 2.0 Reloaded
Akka 2.0 ReloadedAkka 2.0 Reloaded
Akka 2.0 Reloaded
 
Akka knolx
Akka knolxAkka knolx
Akka knolx
 
Reactive programming with akka
Reactive programming with akka Reactive programming with akka
Reactive programming with akka
 
Reactive Programming in Akka
Reactive Programming in AkkaReactive Programming in Akka
Reactive Programming in Akka
 
Architectural patterns part 4
Architectural patterns part 4Architectural patterns part 4
Architectural patterns part 4
 
Reactive Programming in .Net - actorbased computing with Akka.Net
Reactive Programming in .Net - actorbased computing with Akka.NetReactive Programming in .Net - actorbased computing with Akka.Net
Reactive Programming in .Net - actorbased computing with Akka.Net
 
Building Massively Scalable application with Akka 2.0
Building Massively Scalable application with Akka 2.0Building Massively Scalable application with Akka 2.0
Building Massively Scalable application with Akka 2.0
 
Actors model in gpars
Actors model in gparsActors model in gpars
Actors model in gpars
 
Akka and futures
Akka and futuresAkka and futures
Akka and futures
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_group
 
Discovering the Service Fabric's actor model
Discovering the Service Fabric's actor modelDiscovering the Service Fabric's actor model
Discovering the Service Fabric's actor model
 
Scale up your thinking
Scale up your thinkingScale up your thinking
Scale up your thinking
 

More from mitesh_sharma

Aws cost optimized logging using api gateway, sqs and elastic search
Aws  cost optimized logging using api gateway, sqs and elastic searchAws  cost optimized logging using api gateway, sqs and elastic search
Aws cost optimized logging using api gateway, sqs and elastic searchmitesh_sharma
 
Stress driven development
Stress driven developmentStress driven development
Stress driven developmentmitesh_sharma
 
Developing Url Shortener With Dynamic Behaviour Using AWS Lambda
Developing Url Shortener With Dynamic Behaviour Using AWS LambdaDeveloping Url Shortener With Dynamic Behaviour Using AWS Lambda
Developing Url Shortener With Dynamic Behaviour Using AWS Lambdamitesh_sharma
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthroughmitesh_sharma
 
Build and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWSBuild and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWSmitesh_sharma
 
Localize content Devops
Localize content DevopsLocalize content Devops
Localize content Devopsmitesh_sharma
 
Play Framework Logging
Play Framework LoggingPlay Framework Logging
Play Framework Loggingmitesh_sharma
 

More from mitesh_sharma (9)

Aws cost optimized logging using api gateway, sqs and elastic search
Aws  cost optimized logging using api gateway, sqs and elastic searchAws  cost optimized logging using api gateway, sqs and elastic search
Aws cost optimized logging using api gateway, sqs and elastic search
 
Stress driven development
Stress driven developmentStress driven development
Stress driven development
 
Developing Url Shortener With Dynamic Behaviour Using AWS Lambda
Developing Url Shortener With Dynamic Behaviour Using AWS LambdaDeveloping Url Shortener With Dynamic Behaviour Using AWS Lambda
Developing Url Shortener With Dynamic Behaviour Using AWS Lambda
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthrough
 
Build and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWSBuild and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWS
 
Localize content Devops
Localize content DevopsLocalize content Devops
Localize content Devops
 
Play Framework Logging
Play Framework LoggingPlay Framework Logging
Play Framework Logging
 
All about InfluxDB.
All about InfluxDB.All about InfluxDB.
All about InfluxDB.
 
Memory management
Memory managementMemory management
Memory management
 

Recently uploaded

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Recently uploaded (20)

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Akka framework

  • 1. Akka 101 Actor based concurrency framework
  • 2. What is akka? Event Driven Asynchronous Distributed Reactive Responsive: Respond in timely manner if possible Resilient: Responsive in case of failure
  • 4. Actors Light weight object (around 300 bytes of memory) Accept messages and do whatever they are supposed to do with them Process one message at a time Each actor has messaging queue Asynchronous Serializable and passed to other clients/actors
  • 5. Why actors, why not threads Concurrency : When two threads are making progress. Parallelism that can include time slicing. Parallelism: When two threads are executing simultaneously. Shared states are real evil. Can cause race condition, dead locks, blocking calls. Actors keep mutable state internal. Actors communicate through messages. No shared state between outside
  • 6. Message Passing Fire and forget Send and wait Send and reply using future
  • 7. Akka Components ActorSystem: Actor, ActorRef, MessageDispatcher, Mailbox, Message Queue. ActorRef: Addressable destination of actor MessageDispatcher: Engine that runs parts of actor system and schedule all activity. Main responsibility to run mailbox. ActorRef -> MessageDispatcher -> MessageQueue of destination mailbox Mailbox: Hold actors. Takes message from message queue and invokes a actor.
  • 8. Actor Hierarchies and path All actors belong to actor hierarchies in actor system. Two separate hierarchies: System Hierarchies : Manage internal tasks User hierarchies : Defines actor for our application User level root actor (named Guardian) under which all actors are created. Actor Path: akka://MySystem@MyServer:MyPort/user/TopActor/ChildActor akka is the name of the scheme
  • 9. Supervise Actor can supervise other actors Supervisor detects and respond to failures On actor crash, a notification is send to its supervisor to decide what to do Helps provide clean separation between error handling and message processing Fault handling strategy:
  • 10. Supervision and Monitoring Every actor has a supervisor who created the current one. Responsible for watching its subordinates and handling their problem. Actor detects failure and suspend itself. Supervisor helps by : Resume its subordinate Restart the subordinate Terminate permanently Escalate the failure to its supervisor
  • 11. Routers Type of actor Layer between ActorRef and Actor Route Message to underlying actor Non cluster example: Round robin Consistent hashing Random etc
  • 12. Use case Processing pipeline Streaming data Multi-user concurrency (as one actor run at one time) Systems high uptime requirement (Supervisor make sure actor is live) Application with shared state