SlideShare a Scribd company logo
1 of 27
Download to read offline
Actors and Clustering with Akka
İSMET ÖZÖZTÜRK
Sony
About Me
İsmet Özöztürk, Sony
Software Engineer
Ex-Military Commander
Has been working with Akka ~2 years with love
Concurrency
Concurrency
● Multi-Core CPUs
● Cheaper and Easy to Access hardware
● Distributed Architecture Needs
● Parallelism
Concurrency
● Synchronized code blocks, Locks
● Hard to design and read
● Inefficient
What is an Actor?
Actors
● Primitive unit of computation
● Keeps state private - no shared state
● Process one message at a time
● No locks on the state
● Lightweight object
● Communication via message passing
● Supervision
● Distributed by design
Akka - Áhkká, also known in its
"Swedified" form Akka, is a
massif in the southwestern
corner of Stora Sjöfallet National
Park in northern Sweden.
Akka - Toolkit and runtime for building
highly concurrent, distributed,
and resilient message-driven
applications on the JVM
Akka
Toolkit
● Has several modules
● And counting...
Concurrent
● Thousands of actors in one machine running
at the same time
Distributed
● Actors can live locally or remote
● Can be clustered
Resilient
● Every actor has a supervisor
● They choose what to do when s@#t happens
Akka
● Actor Implementation
● Seamless Remoting
● Java, Scala
● High performance
● Micro Service toolkit
● Fault tolerant (Supervision strategies)
● Easily Scalable
● Event driven architecture
How actors work?
Messages
● Ask
● Tell
● Message can be anything
● Mailbox
○ Bounded
○ Unbounded
○ Priority
○ ..
Behaviour on Message
● Alter internal state
● Reply sender or Send message
● Report error to supervisor
● Create child actors
● Terminate
Actor Reference
● Reference to the actor
● ActorRef can be passed around
● Internal state and methods are hidden
● Unique Address (filesystem like)
Hierarchy
● Parent - Child relation
● Supervision
● Choose to Restart, Resume, Stop children
Clustering
Cluster
A cluster is a group of resources that
are trying to achieve a common
objective, and are aware of one
another.
Load Balancer
A Load Balancer is responsible for
distributing incoming network traffic
across a group of same kind and setup
of backend servers. Can be both
within a cluster or set of servers
which are unaware of each other.
Application Clustering and Load Balancing
● Clustering also involves load balancing
● Clustering shares the state
● Load balancing is more infra than cluster is more app side
● Clustering is harder to setup
● Clustering is more scalable
● From failure-client perspective, when error occurs LB will lose the request,
Cluster can retry on other cluster members
Comparison
Clustering
● Load Balancing
● Shares the state
● Aware of other servers
● Requires application setup
● Harder to setup
● Will retry on other nodes when error
happens
● More scalable
Load Balancing
● Load Balancing
● Keeps state private
● Unaware of others
● Requires infra setup
● Easy to deploy
● Lose info when error occurs
What is actor cluster?
Akka Cluster
Akka Cluster provides a fault-tolerant
decentralized peer-to-peer based
cluster membership service with no
single point of failure or single point
of bottleneck. It does this using gossip
protocols and an automatic failure
detector.
Akka Cluster
Cluster Membership
● Aware of who is on the cluster
● Let actors to join/leave cluster
Fault tolerant - Failure
Detector
● Aware of who is reachable/unreachable
No Single Point of
Failure
● Messages can be routed to set actors
Gossip Protocol
● Send random actors about the actors observed
● Update cluster state based on messages
Akka Cluster
● Gossip-Based Cluster Membership
● Failure Detector
● Cluster Aware Routers
● Metrics
● Load balancing and routing (round-robin, adaptive to metrics)
● Distributed Data (experimental)
Recap
● Concurrency
● Actors
● Akka
● How Actors work in Akka
● Clusters and Load Balancers
● Clustering with Akka
One Service is No Service.
Cluster
Everything!

More Related Content

What's hot

Biomatters and Amazon Web Services
Biomatters and Amazon Web Services Biomatters and Amazon Web Services
Biomatters and Amazon Web Services Biomatters
 
Levelling up in Akka
Levelling up in AkkaLevelling up in Akka
Levelling up in AkkaSigmoid
 
Building large scale, job processing systems with Scala Akka Actor framework
Building large scale, job processing systems with Scala Akka Actor frameworkBuilding large scale, job processing systems with Scala Akka Actor framework
Building large scale, job processing systems with Scala Akka Actor frameworkVignesh Sukumar
 
MySQL Multi-Master Replication
MySQL Multi-Master ReplicationMySQL Multi-Master Replication
MySQL Multi-Master ReplicationMichael Naumov
 
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...Anant Corporation
 
Take a Look at Akka+Java (English version)
Take a Look at Akka+Java (English version)Take a Look at Akka+Java (English version)
Take a Look at Akka+Java (English version)GlobalLogic Ukraine
 
Distributed systems and consistency
Distributed systems and consistencyDistributed systems and consistency
Distributed systems and consistencyseldo
 
SQL Server: Now It's Everywhere You Want to Be
SQL Server: Now It's Everywhere You Want to BeSQL Server: Now It's Everywhere You Want to Be
SQL Server: Now It's Everywhere You Want to BeEd Leighton-Dick
 
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...Bob Pusateri
 
Clustering - Eric Vanderburg
Clustering - Eric VanderburgClustering - Eric Vanderburg
Clustering - Eric VanderburgEric Vanderburg
 
Difference between parallel and sequential computing
Difference between parallel and sequential computingDifference between parallel and sequential computing
Difference between parallel and sequential computingAyeshaGul25
 
Nagios Conference 2014 - Bryan Heden - 10,000 Services Across The State of Ohio
Nagios Conference 2014 - Bryan Heden - 10,000 Services Across The State of OhioNagios Conference 2014 - Bryan Heden - 10,000 Services Across The State of Ohio
Nagios Conference 2014 - Bryan Heden - 10,000 Services Across The State of OhioNagios
 
Indic threads pune12-typesafe stack software development on the jvm
Indic threads pune12-typesafe stack software development on the jvmIndic threads pune12-typesafe stack software development on the jvm
Indic threads pune12-typesafe stack software development on the jvmIndicThreads
 
Should i break it?
Should i break it?Should i break it?
Should i break it?Gal Marder
 
Bundle deployment at state machine level - Ales Justin, JBoss
Bundle deployment at state machine level - Ales Justin, JBossBundle deployment at state machine level - Ales Justin, JBoss
Bundle deployment at state machine level - Ales Justin, JBossmfrancis
 
Reactive Micro Services with Java seminar
Reactive Micro Services with Java seminarReactive Micro Services with Java seminar
Reactive Micro Services with Java seminarGal Marder
 

What's hot (19)

Biomatters and Amazon Web Services
Biomatters and Amazon Web Services Biomatters and Amazon Web Services
Biomatters and Amazon Web Services
 
Levelling up in Akka
Levelling up in AkkaLevelling up in Akka
Levelling up in Akka
 
Building large scale, job processing systems with Scala Akka Actor framework
Building large scale, job processing systems with Scala Akka Actor frameworkBuilding large scale, job processing systems with Scala Akka Actor framework
Building large scale, job processing systems with Scala Akka Actor framework
 
Reactive programming
Reactive programmingReactive programming
Reactive programming
 
MySQL Multi-Master Replication
MySQL Multi-Master ReplicationMySQL Multi-Master Replication
MySQL Multi-Master Replication
 
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
 
Take a Look at Akka+Java (English version)
Take a Look at Akka+Java (English version)Take a Look at Akka+Java (English version)
Take a Look at Akka+Java (English version)
 
Distributed systems and consistency
Distributed systems and consistencyDistributed systems and consistency
Distributed systems and consistency
 
SQL Server: Now It's Everywhere You Want to Be
SQL Server: Now It's Everywhere You Want to BeSQL Server: Now It's Everywhere You Want to Be
SQL Server: Now It's Everywhere You Want to Be
 
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
 
Clustering - Eric Vanderburg
Clustering - Eric VanderburgClustering - Eric Vanderburg
Clustering - Eric Vanderburg
 
Difference between parallel and sequential computing
Difference between parallel and sequential computingDifference between parallel and sequential computing
Difference between parallel and sequential computing
 
NoSQL Evolution
NoSQL EvolutionNoSQL Evolution
NoSQL Evolution
 
Nagios Conference 2014 - Bryan Heden - 10,000 Services Across The State of Ohio
Nagios Conference 2014 - Bryan Heden - 10,000 Services Across The State of OhioNagios Conference 2014 - Bryan Heden - 10,000 Services Across The State of Ohio
Nagios Conference 2014 - Bryan Heden - 10,000 Services Across The State of Ohio
 
Indic threads pune12-typesafe stack software development on the jvm
Indic threads pune12-typesafe stack software development on the jvmIndic threads pune12-typesafe stack software development on the jvm
Indic threads pune12-typesafe stack software development on the jvm
 
Should i break it?
Should i break it?Should i break it?
Should i break it?
 
Bundle deployment at state machine level - Ales Justin, JBoss
Bundle deployment at state machine level - Ales Justin, JBossBundle deployment at state machine level - Ales Justin, JBoss
Bundle deployment at state machine level - Ales Justin, JBoss
 
Reactive Micro Services with Java seminar
Reactive Micro Services with Java seminarReactive Micro Services with Java seminar
Reactive Micro Services with Java seminar
 
Lost with data consistency
Lost with data consistencyLost with data consistency
Lost with data consistency
 

Viewers also liked

Pavel Geystrin Portfolio March 2017
Pavel Geystrin Portfolio March 2017Pavel Geystrin Portfolio March 2017
Pavel Geystrin Portfolio March 2017Pavel Geystrin
 
Test management with iso 29119 building up an efficient test process
Test management with iso 29119 building up an efficient test processTest management with iso 29119 building up an efficient test process
Test management with iso 29119 building up an efficient test processYulia Zavertailo
 
Электронное пособие по предмету «Литература Урала», 8-й класс «Словесность го...
Электронное пособие по предмету «Литература Урала», 8-й класс «Словесность го...Электронное пособие по предмету «Литература Урала», 8-й класс «Словесность го...
Электронное пособие по предмету «Литература Урала», 8-й класс «Словесность го...DROFA-VENTANA
 
1. Osteologia y cinematica de la cadera
1. Osteologia y cinematica de la cadera1. Osteologia y cinematica de la cadera
1. Osteologia y cinematica de la caderabrunoformacion
 
Tesis eficacia y seguridad del prp en pacientes con ulcera de etiología venosa
Tesis eficacia y seguridad del prp en pacientes con ulcera de etiología venosaTesis eficacia y seguridad del prp en pacientes con ulcera de etiología venosa
Tesis eficacia y seguridad del prp en pacientes con ulcera de etiología venosaGNEAUPP.
 
«Бессмертный батальон юных защитников Отечества»
«Бессмертный батальон юных защитников Отечества»«Бессмертный батальон юных защитников Отечества»
«Бессмертный батальон юных защитников Отечества»ГБОУ Школа №1370
 
Determinación de las características biomecánicas del paciente diabético con ...
Determinación de las características biomecánicas del paciente diabético con ...Determinación de las características biomecánicas del paciente diabético con ...
Determinación de las características biomecánicas del paciente diabético con ...GNEAUPP.
 
LOGÍSTICA EN BOLIVIA
LOGÍSTICA EN BOLIVIALOGÍSTICA EN BOLIVIA
LOGÍSTICA EN BOLIVIACADEX SCZ
 
Bloque 7, Historia de España
Bloque 7, Historia de EspañaBloque 7, Historia de España
Bloque 7, Historia de EspañaRamón
 
Google AdWords ako ho nepoznáte | MDS | ONLINE KLUB 2017
Google AdWords ako ho nepoznáte | MDS | ONLINE KLUB 2017Google AdWords ako ho nepoznáte | MDS | ONLINE KLUB 2017
Google AdWords ako ho nepoznáte | MDS | ONLINE KLUB 2017ONLINE KLUB
 
Biml for Beginners: Speed up your SSIS development (Malta Microsoft Data Plat...
Biml for Beginners: Speed up your SSIS development (Malta Microsoft Data Plat...Biml for Beginners: Speed up your SSIS development (Malta Microsoft Data Plat...
Biml for Beginners: Speed up your SSIS development (Malta Microsoft Data Plat...Cathrine Wilhelmsen
 
Red skull who is he
Red skull who is heRed skull who is he
Red skull who is he126408
 
Cyborg1 [autosaved]
Cyborg1 [autosaved]Cyborg1 [autosaved]
Cyborg1 [autosaved]127196
 
Consulta Pública Ancine – Comunicação Audiovisual Sob Demanda
Consulta Pública Ancine – Comunicação Audiovisual Sob DemandaConsulta Pública Ancine – Comunicação Audiovisual Sob Demanda
Consulta Pública Ancine – Comunicação Audiovisual Sob DemandaBrasscom
 
Designing for the User
Designing for the UserDesigning for the User
Designing for the UserDevon Walker
 

Viewers also liked (20)

Pavel Geystrin Portfolio March 2017
Pavel Geystrin Portfolio March 2017Pavel Geystrin Portfolio March 2017
Pavel Geystrin Portfolio March 2017
 
Internet y redes
Internet y redesInternet y redes
Internet y redes
 
Running presentation
Running presentationRunning presentation
Running presentation
 
Test management with iso 29119 building up an efficient test process
Test management with iso 29119 building up an efficient test processTest management with iso 29119 building up an efficient test process
Test management with iso 29119 building up an efficient test process
 
Электронное пособие по предмету «Литература Урала», 8-й класс «Словесность го...
Электронное пособие по предмету «Литература Урала», 8-й класс «Словесность го...Электронное пособие по предмету «Литература Урала», 8-й класс «Словесность го...
Электронное пособие по предмету «Литература Урала», 8-й класс «Словесность го...
 
Praia de camurupim
Praia de camurupimPraia de camurupim
Praia de camurupim
 
1. Osteologia y cinematica de la cadera
1. Osteologia y cinematica de la cadera1. Osteologia y cinematica de la cadera
1. Osteologia y cinematica de la cadera
 
Cuaderno de campo primaria bueno
Cuaderno de campo primaria buenoCuaderno de campo primaria bueno
Cuaderno de campo primaria bueno
 
Tesis eficacia y seguridad del prp en pacientes con ulcera de etiología venosa
Tesis eficacia y seguridad del prp en pacientes con ulcera de etiología venosaTesis eficacia y seguridad del prp en pacientes con ulcera de etiología venosa
Tesis eficacia y seguridad del prp en pacientes con ulcera de etiología venosa
 
«Бессмертный батальон юных защитников Отечества»
«Бессмертный батальон юных защитников Отечества»«Бессмертный батальон юных защитников Отечества»
«Бессмертный батальон юных защитников Отечества»
 
Determinación de las características biomecánicas del paciente diabético con ...
Determinación de las características biomecánicas del paciente diabético con ...Determinación de las características biomecánicas del paciente diabético con ...
Determinación de las características biomecánicas del paciente diabético con ...
 
LOGÍSTICA EN BOLIVIA
LOGÍSTICA EN BOLIVIALOGÍSTICA EN BOLIVIA
LOGÍSTICA EN BOLIVIA
 
Bloque 7, Historia de España
Bloque 7, Historia de EspañaBloque 7, Historia de España
Bloque 7, Historia de España
 
Google AdWords ako ho nepoznáte | MDS | ONLINE KLUB 2017
Google AdWords ako ho nepoznáte | MDS | ONLINE KLUB 2017Google AdWords ako ho nepoznáte | MDS | ONLINE KLUB 2017
Google AdWords ako ho nepoznáte | MDS | ONLINE KLUB 2017
 
Biml for Beginners: Speed up your SSIS development (Malta Microsoft Data Plat...
Biml for Beginners: Speed up your SSIS development (Malta Microsoft Data Plat...Biml for Beginners: Speed up your SSIS development (Malta Microsoft Data Plat...
Biml for Beginners: Speed up your SSIS development (Malta Microsoft Data Plat...
 
Red skull who is he
Red skull who is heRed skull who is he
Red skull who is he
 
Cyborg1 [autosaved]
Cyborg1 [autosaved]Cyborg1 [autosaved]
Cyborg1 [autosaved]
 
Consulta Pública Ancine – Comunicação Audiovisual Sob Demanda
Consulta Pública Ancine – Comunicação Audiovisual Sob DemandaConsulta Pública Ancine – Comunicação Audiovisual Sob Demanda
Consulta Pública Ancine – Comunicação Audiovisual Sob Demanda
 
Ppe g1 grupal
Ppe g1  grupalPpe g1  grupal
Ppe g1 grupal
 
Designing for the User
Designing for the UserDesigning for the User
Designing for the User
 

Similar to Actors and Clustering with Akka

Introduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsIntroduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsdatamantra
 
Introduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsIntroduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsShashank L
 
Introduction to Kafka Connectors (Knolx).pptx
Introduction to Kafka Connectors (Knolx).pptxIntroduction to Kafka Connectors (Knolx).pptx
Introduction to Kafka Connectors (Knolx).pptxKnoldus Inc.
 
Scalable Soa
Scalable SoaScalable Soa
Scalable SoaWSO2
 
Spark to Production @Windward
Spark to Production @WindwardSpark to Production @Windward
Spark to Production @WindwardDemi Ben-Ari
 
Introduction to Akka Serverless
Introduction to Akka ServerlessIntroduction to Akka Serverless
Introduction to Akka ServerlessKnoldus Inc.
 
Introduction to Akka-Streams
Introduction to Akka-StreamsIntroduction to Akka-Streams
Introduction to Akka-Streamsdmantula
 
Comparison between zookeeper, etcd 3 and other distributed coordination systems
Comparison between zookeeper, etcd 3 and other distributed coordination systemsComparison between zookeeper, etcd 3 and other distributed coordination systems
Comparison between zookeeper, etcd 3 and other distributed coordination systemsImesha Sudasingha
 
MySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspectiveMySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspectiveUlf Wendel
 
Our Multi-Year Journey to a 10x Faster Confluent Cloud
Our Multi-Year Journey to a 10x Faster Confluent CloudOur Multi-Year Journey to a 10x Faster Confluent Cloud
Our Multi-Year Journey to a 10x Faster Confluent CloudHostedbyConfluent
 
Building stateful systems with akka cluster sharding
Building stateful systems with akka cluster shardingBuilding stateful systems with akka cluster sharding
Building stateful systems with akka cluster shardingKnoldus Inc.
 
Linux kernel development_ch9-10_20120410
Linux kernel development_ch9-10_20120410Linux kernel development_ch9-10_20120410
Linux kernel development_ch9-10_20120410huangachou
 
Linux kernel development chapter 10
Linux kernel development chapter 10Linux kernel development chapter 10
Linux kernel development chapter 10huangachou
 
Introduction to Kafka Connectors
Introduction to Kafka Connectors Introduction to Kafka Connectors
Introduction to Kafka Connectors Knoldus Inc.
 
Introduction to Kafka Connectors
Introduction to Kafka ConnectorsIntroduction to Kafka Connectors
Introduction to Kafka ConnectorsKnoldus Inc.
 
Akka Clustering And Sharding
Akka Clustering And ShardingAkka Clustering And Sharding
Akka Clustering And ShardingKnoldus Inc.
 

Similar to Actors and Clustering with Akka (20)

Introduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsIntroduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actors
 
Introduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsIntroduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actors
 
Introduction to Kafka Connectors (Knolx).pptx
Introduction to Kafka Connectors (Knolx).pptxIntroduction to Kafka Connectors (Knolx).pptx
Introduction to Kafka Connectors (Knolx).pptx
 
Failover cluster
Failover clusterFailover cluster
Failover cluster
 
Scalable Soa
Scalable SoaScalable Soa
Scalable Soa
 
Actors in the Small
Actors in the SmallActors in the Small
Actors in the Small
 
Spark to Production @Windward
Spark to Production @WindwardSpark to Production @Windward
Spark to Production @Windward
 
Introduction to Akka Serverless
Introduction to Akka ServerlessIntroduction to Akka Serverless
Introduction to Akka Serverless
 
Introduction to Akka-Streams
Introduction to Akka-StreamsIntroduction to Akka-Streams
Introduction to Akka-Streams
 
Comparison between zookeeper, etcd 3 and other distributed coordination systems
Comparison between zookeeper, etcd 3 and other distributed coordination systemsComparison between zookeeper, etcd 3 and other distributed coordination systems
Comparison between zookeeper, etcd 3 and other distributed coordination systems
 
MySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspectiveMySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspective
 
Our Multi-Year Journey to a 10x Faster Confluent Cloud
Our Multi-Year Journey to a 10x Faster Confluent CloudOur Multi-Year Journey to a 10x Faster Confluent Cloud
Our Multi-Year Journey to a 10x Faster Confluent Cloud
 
Building stateful systems with akka cluster sharding
Building stateful systems with akka cluster shardingBuilding stateful systems with akka cluster sharding
Building stateful systems with akka cluster sharding
 
Linux kernel development_ch9-10_20120410
Linux kernel development_ch9-10_20120410Linux kernel development_ch9-10_20120410
Linux kernel development_ch9-10_20120410
 
Linux kernel development chapter 10
Linux kernel development chapter 10Linux kernel development chapter 10
Linux kernel development chapter 10
 
Kafka: Internals
Kafka: InternalsKafka: Internals
Kafka: Internals
 
Akka Remoting
Akka RemotingAkka Remoting
Akka Remoting
 
Introduction to Kafka Connectors
Introduction to Kafka Connectors Introduction to Kafka Connectors
Introduction to Kafka Connectors
 
Introduction to Kafka Connectors
Introduction to Kafka ConnectorsIntroduction to Kafka Connectors
Introduction to Kafka Connectors
 
Akka Clustering And Sharding
Akka Clustering And ShardingAkka Clustering And Sharding
Akka Clustering And Sharding
 

Recently uploaded

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

Actors and Clustering with Akka

  • 1. Actors and Clustering with Akka İSMET ÖZÖZTÜRK Sony
  • 2. About Me İsmet Özöztürk, Sony Software Engineer Ex-Military Commander Has been working with Akka ~2 years with love
  • 4. Concurrency ● Multi-Core CPUs ● Cheaper and Easy to Access hardware ● Distributed Architecture Needs ● Parallelism
  • 5. Concurrency ● Synchronized code blocks, Locks ● Hard to design and read ● Inefficient
  • 6. What is an Actor?
  • 7. Actors ● Primitive unit of computation ● Keeps state private - no shared state ● Process one message at a time ● No locks on the state ● Lightweight object ● Communication via message passing ● Supervision ● Distributed by design
  • 8. Akka - Áhkká, also known in its "Swedified" form Akka, is a massif in the southwestern corner of Stora Sjöfallet National Park in northern Sweden.
  • 9. Akka - Toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM
  • 10. Akka Toolkit ● Has several modules ● And counting... Concurrent ● Thousands of actors in one machine running at the same time Distributed ● Actors can live locally or remote ● Can be clustered Resilient ● Every actor has a supervisor ● They choose what to do when s@#t happens
  • 11. Akka ● Actor Implementation ● Seamless Remoting ● Java, Scala ● High performance ● Micro Service toolkit ● Fault tolerant (Supervision strategies) ● Easily Scalable ● Event driven architecture
  • 13. Messages ● Ask ● Tell ● Message can be anything ● Mailbox ○ Bounded ○ Unbounded ○ Priority ○ ..
  • 14. Behaviour on Message ● Alter internal state ● Reply sender or Send message ● Report error to supervisor ● Create child actors ● Terminate
  • 15. Actor Reference ● Reference to the actor ● ActorRef can be passed around ● Internal state and methods are hidden ● Unique Address (filesystem like)
  • 16. Hierarchy ● Parent - Child relation ● Supervision ● Choose to Restart, Resume, Stop children
  • 18. Cluster A cluster is a group of resources that are trying to achieve a common objective, and are aware of one another.
  • 19. Load Balancer A Load Balancer is responsible for distributing incoming network traffic across a group of same kind and setup of backend servers. Can be both within a cluster or set of servers which are unaware of each other.
  • 20. Application Clustering and Load Balancing ● Clustering also involves load balancing ● Clustering shares the state ● Load balancing is more infra than cluster is more app side ● Clustering is harder to setup ● Clustering is more scalable ● From failure-client perspective, when error occurs LB will lose the request, Cluster can retry on other cluster members
  • 21. Comparison Clustering ● Load Balancing ● Shares the state ● Aware of other servers ● Requires application setup ● Harder to setup ● Will retry on other nodes when error happens ● More scalable Load Balancing ● Load Balancing ● Keeps state private ● Unaware of others ● Requires infra setup ● Easy to deploy ● Lose info when error occurs
  • 22. What is actor cluster?
  • 23. Akka Cluster Akka Cluster provides a fault-tolerant decentralized peer-to-peer based cluster membership service with no single point of failure or single point of bottleneck. It does this using gossip protocols and an automatic failure detector.
  • 24. Akka Cluster Cluster Membership ● Aware of who is on the cluster ● Let actors to join/leave cluster Fault tolerant - Failure Detector ● Aware of who is reachable/unreachable No Single Point of Failure ● Messages can be routed to set actors Gossip Protocol ● Send random actors about the actors observed ● Update cluster state based on messages
  • 25. Akka Cluster ● Gossip-Based Cluster Membership ● Failure Detector ● Cluster Aware Routers ● Metrics ● Load balancing and routing (round-robin, adaptive to metrics) ● Distributed Data (experimental)
  • 26. Recap ● Concurrency ● Actors ● Akka ● How Actors work in Akka ● Clusters and Load Balancers ● Clustering with Akka
  • 27. One Service is No Service. Cluster Everything!