SlideShare a Scribd company logo
1 of 48
Download to read offline
TAKE A LOOK AT
AKKA + JAVA
Dmytro Mantula
GlobalLogic, Kyiv
PREVIOUS AGE OF COMPUTING SYSTEMS
• Monolith software architecture
• Managed servers and containers
• RDBMS, transactions isolation
• Scalability: scale-up by more powerful hardware
• Proprietary enterprise solutions
NEW CHALLENGES
• response time: s -> ms
• high availability: 3 nines (8h/y) -> 5+ nines (5– m/y)
• storage: GBs (10
9
) -> PBs (10
15
)+
• hardware: spread from mobile phone to 1000+
nodes cluster
MOORE’S LAW
EVIL OF CPU PERFORMANCE:
MOORE’S LAW
DOESN’T WORK
ANYMORE
FOR A SINGLE CORE
The more CPU cores a system
has,
the faster it is.
True or false?
EVIL OF PARALLELISM:
AMDAHL’S LAW
Gene Amdahl
1967
STUBBORN AMDAHL’S LAW
The speedup of a program
using multiple processors in parallel computing
is limited by the sequential fraction of the program.
EVIL OF CONCURRENCY:
SHARED MUTABLE
STATE
«Do not communicate
by sharing memory.
Instead, share memory
by communicating»
– Effective Go
v1.0: July 2013
v2.0: Sept 2014
REACTIVE SOFTWARE DESIGN
http://www.reactivemanifesto.org/
• rapid and consistent response times
• response in SLA time may be more
important than late correct response
• problems may be detected quickly
and dealt with effectively
react to users
Responsive
v1.0: July 2013
v2.0: Sept 2014
REACTIVE SOFTWARE DESIGN
http://www.reactivemanifesto.org/
react to load
Elastic
• No contention points or central bottlenecks
• ability to shard or replicate components
and distribute inputs among them
• Automatic resource management
• scale-up
• scale-out
• scale-down
• scale-in
v1.0: July 2013
v2.0: Sept 2014
REACTIVE SOFTWARE DESIGN
http://www.reactivemanifesto.org/
• “Let it crash!”: there is no way to think
about every single failure point
• failure is not dealt with as an error
• means that some capacity of the
system will be reduced
• dealt with as a message
react to failures
Resilient
v1.0: July 2013
v2.0: Sept 2014
REACTIVE SOFTWARE DESIGN
http://www.reactivemanifesto.org/
Asynchronous message-passing
• loose coupling
• isolation of components
• location transparency
• failures as messages
Benefits:
• load management
• elasticity
• flow control (monitoring , back-pressure)
react to events
Message Driven
Application
should be reactive
from top to
bottom
v1.0: July 2013
v2.0: Sept 2014
REACTIVE SOFTWARE DESIGN
http://www.reactivemanifesto.org/
CARL HEWITT, 1973
ACTOR MODEL
• Describes:
• message processing algorithm
• data storage principles
• interaction between modules
• Erlang
• Used in telecommunication systems
• High Availability of 9 “nines”
• Written in Scala
• Stable since 2009
• Part of Scala Standard Library since 2013
• Supports Java 8 since 2014
by
ex
WHAT IS AN ACTOR?
Actor is a unit of code
with a mailbox
and an internal state
that just responds to messages
in a single thread
(briefly)
IDLE
TWO STATES OF ACTOR
IDLE
TWO STATES OF ACTOR
MESSAGE PROCESSING
WHAT IS AN ACTOR?
• Similar to object in OOP, but message-driven
• Even more isolated than object: no explicit access
exposed (hidden behind ActorRef)
• no shared state
• location transparent (can live in different JVMs)
• Light-weight: 300B memory footprint (millions per GB)
• No threads allocated in idle state
• Single-threaded invocation inside, sequential message
processing
• Supervises children actors
WHAT CAN ACTOR DO?
• If no messages being processed:
• Nothing
• When message being processed (one at a time):
• make local decisions
• send messages to other actors (incl. sender() and self())
• do other actions with side-effects (IO, logs, DB access)
• change own behavior for next messages
• create more actors (and promise to supervise them)
BENEFITS
• You’re not going to have multiple threads modifying a
variable at the same time.
• Forget about:
• Shared state
• Threads
• Locks, “synchronized”
• Concurrent collections
• wait/notify/notifyAll
• Describe only business behavior in the code.
• Akka and app configuration care about everything else.
MESSAGE CLASS
• Obligatory: purely-immutable
• Desirably: serializable
• Good practice: declared with recipient Actor class
MESSAGE CLASS
• Obligatory: purely-immutable
• Desirably: serializable
• Good practice: declared with recipient Actor class
SCALA:
ACTOR IN JAVA 7
ACTOR IN JAVA 7
Strict @Override
ACTOR IN JAVA 7
Casting boilerplate
Strict @Override
ACTOR IN JAVA 7
Casting boilerplate
Strict @Override
“if” hell
ACTOR IN JAVA 7
Casting boilerplate
Strict @Override
“if” hell
Do not forget!!!
ACTOR IN JAVA 8
Partial function
ACTOR IN JAVA 8
Partial function
Behavior
as a constant
ACTOR IN JAVA 8
Partial function
Behavior
as a constant
Type
inference
within lambda
ACTOR IN JAVA 8
Partial function
Behavior
as a constant
Type
inference
within lambda
ACTOR IN JAVA 8
Predicate
ACTORSYSTEM AND ENTRY POINT
DONEC QUIS NUNC
SUPERVISION MODEL
ROUTING
• RoundRobin
• Random
• SmallestMailbox
• Broadcast
• ScatterGatherFirstCompleted
• (Custom)
REMOTE ACTORS
WHERE TO USE AKKA?
• Multi-user concurrency (e.g. gambling systems)
• Rule based systems (like trading systems)
• Data storages with lots of write operations
• Systems with high-uptime requirements (like telecom)
• Processing pipelines
• Streaming data
• Reactive frameworks
DERIVATIVE FRAMEWORKS/TOOLS
• For testing actors: Akka TestKit
• Software Transactional Memory: Akka STM
• Finite State Machines: Akka FSM
• Durable mailboxes & other persistence models
• Akka IO, Akka Streams, Akka Cluster
• Akka HTTP (ex. Spray)
• Play Framework
• Akka Camel, Akka Spring
• Activator
RESOURCES
http://akka.io/
http://lightbend.com
http://letitcrash.com
Coursera:
Principles of Reactive Programming
THANKS!
Q & A

More Related Content

What's hot

Functional reactive programming
Functional reactive programmingFunctional reactive programming
Functional reactive programmingAhmed Kamel Taha
 
Reactive programming
Reactive programmingReactive programming
Reactive programmingNick Hodge
 
Actor model in .NET - Akka.NET
Actor model in .NET - Akka.NETActor model in .NET - Akka.NET
Actor model in .NET - Akka.NETKonrad Dusza
 
Aspect j introduction for non-programmers
Aspect j introduction for non-programmersAspect j introduction for non-programmers
Aspect j introduction for non-programmersTamas Rev
 
Data consistency: Analyse, understand and decide
Data consistency: Analyse, understand and decideData consistency: Analyse, understand and decide
Data consistency: Analyse, understand and decideLouis Jacomet
 
Dependency injection presentation
Dependency injection presentationDependency injection presentation
Dependency injection presentationAhasanul Kalam Akib
 
Introduction to Akka
Introduction to AkkaIntroduction to Akka
Introduction to AkkaKnoldus Inc.
 
The Evolution of Continuous Delivery at Scale @ Linkedin
The Evolution of Continuous Delivery at Scale @ LinkedinThe Evolution of Continuous Delivery at Scale @ Linkedin
The Evolution of Continuous Delivery at Scale @ LinkedinC4Media
 
Introduction to Scala Macros
Introduction to Scala MacrosIntroduction to Scala Macros
Introduction to Scala MacrosKnoldus Inc.
 
Multi-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarMulti-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarGal Marder
 
The Actor Model - Towards Better Concurrency
The Actor Model - Towards Better ConcurrencyThe Actor Model - Towards Better Concurrency
The Actor Model - Towards Better ConcurrencyDror Bereznitsky
 
Reactive programming
Reactive programmingReactive programming
Reactive programmingsaykopatt
 
Reactive programming with rx java
Reactive programming with rx javaReactive programming with rx java
Reactive programming with rx javaCongTrung Vnit
 
.NET Standard - NuGet Analysis
.NET Standard - NuGet Analysis.NET Standard - NuGet Analysis
.NET Standard - NuGet AnalysisImmo Landwerth
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and AkkaYung-Lin Ho
 

What's hot (20)

Reactive programming intro
Reactive programming introReactive programming intro
Reactive programming intro
 
Reactive programming
Reactive programmingReactive programming
Reactive programming
 
Functional reactive programming
Functional reactive programmingFunctional reactive programming
Functional reactive programming
 
Reactive programming
Reactive programmingReactive programming
Reactive programming
 
Actor model in .NET - Akka.NET
Actor model in .NET - Akka.NETActor model in .NET - Akka.NET
Actor model in .NET - Akka.NET
 
Aspect j introduction for non-programmers
Aspect j introduction for non-programmersAspect j introduction for non-programmers
Aspect j introduction for non-programmers
 
Elixir@SFI
Elixir@SFIElixir@SFI
Elixir@SFI
 
Data consistency: Analyse, understand and decide
Data consistency: Analyse, understand and decideData consistency: Analyse, understand and decide
Data consistency: Analyse, understand and decide
 
Dependency injection presentation
Dependency injection presentationDependency injection presentation
Dependency injection presentation
 
Introduction to Akka
Introduction to AkkaIntroduction to Akka
Introduction to Akka
 
The Evolution of Continuous Delivery at Scale @ Linkedin
The Evolution of Continuous Delivery at Scale @ LinkedinThe Evolution of Continuous Delivery at Scale @ Linkedin
The Evolution of Continuous Delivery at Scale @ Linkedin
 
Async programming in c#
Async programming in c#Async programming in c#
Async programming in c#
 
Introduction to Scala Macros
Introduction to Scala MacrosIntroduction to Scala Macros
Introduction to Scala Macros
 
Multi-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarMulti-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and Quasar
 
The Actor Model - Towards Better Concurrency
The Actor Model - Towards Better ConcurrencyThe Actor Model - Towards Better Concurrency
The Actor Model - Towards Better Concurrency
 
Javantura v4 - The power of cloud in professional services company - Ivan Krn...
Javantura v4 - The power of cloud in professional services company - Ivan Krn...Javantura v4 - The power of cloud in professional services company - Ivan Krn...
Javantura v4 - The power of cloud in professional services company - Ivan Krn...
 
Reactive programming
Reactive programmingReactive programming
Reactive programming
 
Reactive programming with rx java
Reactive programming with rx javaReactive programming with rx java
Reactive programming with rx java
 
.NET Standard - NuGet Analysis
.NET Standard - NuGet Analysis.NET Standard - NuGet Analysis
.NET Standard - NuGet Analysis
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and Akka
 

Similar to Take a Look at Akka+Java (English version)

Introduction to Akka-Streams
Introduction to Akka-StreamsIntroduction to Akka-Streams
Introduction to Akka-Streamsdmantula
 
Dependency Management at Scale @ JConf Centroamérica 2020
Dependency Management at Scale @ JConf Centroamérica 2020Dependency Management at Scale @ JConf Centroamérica 2020
Dependency Management at Scale @ JConf Centroamérica 2020Roberto Pérez Alcolea
 
Building Asynchronous Applications
Building Asynchronous ApplicationsBuilding Asynchronous Applications
Building Asynchronous ApplicationsJohan Edstrom
 
Erjang - A journey into Erlang-land
Erjang - A journey into Erlang-landErjang - A journey into Erlang-land
Erjang - A journey into Erlang-landKresten Krab Thorup
 
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
 
Cloud Immortality - Architecting for High Availability & Disaster Recovery
Cloud Immortality - Architecting for High Availability & Disaster RecoveryCloud Immortality - Architecting for High Availability & Disaster Recovery
Cloud Immortality - Architecting for High Availability & Disaster RecoveryRightScale
 
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...Michael Elder
 
Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdprat0ham
 
Agile Lab_BigData_Meetup_AKKA
Agile Lab_BigData_Meetup_AKKAAgile Lab_BigData_Meetup_AKKA
Agile Lab_BigData_Meetup_AKKAPaolo Platter
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications OpenEBS
 
Nine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take youNine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take youMarkus Eisele
 
Do's and don'ts when deploying akka in production
Do's and don'ts when deploying akka in productionDo's and don'ts when deploying akka in production
Do's and don'ts when deploying akka in productionjglobal
 
Building FoundationDB
Building FoundationDBBuilding FoundationDB
Building FoundationDBFoundationDB
 
Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...Codemotion
 
Solving k8s persistent workloads using k8s DevOps style
Solving k8s persistent workloads using k8s DevOps styleSolving k8s persistent workloads using k8s DevOps style
Solving k8s persistent workloads using k8s DevOps styleMayaData
 

Similar to Take a Look at Akka+Java (English version) (20)

Introduction to Akka-Streams
Introduction to Akka-StreamsIntroduction to Akka-Streams
Introduction to Akka-Streams
 
Dependency Management at Scale @ JConf Centroamérica 2020
Dependency Management at Scale @ JConf Centroamérica 2020Dependency Management at Scale @ JConf Centroamérica 2020
Dependency Management at Scale @ JConf Centroamérica 2020
 
Building Asynchronous Applications
Building Asynchronous ApplicationsBuilding Asynchronous Applications
Building Asynchronous Applications
 
Erjang - A journey into Erlang-land
Erjang - A journey into Erlang-landErjang - A journey into Erlang-land
Erjang - A journey into Erlang-land
 
Nodejs from zero to hero
Nodejs from zero to heroNodejs from zero to hero
Nodejs from zero to hero
 
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
 
Cloud Immortality - Architecting for High Availability & Disaster Recovery
Cloud Immortality - Architecting for High Availability & Disaster RecoveryCloud Immortality - Architecting for High Availability & Disaster Recovery
Cloud Immortality - Architecting for High Availability & Disaster Recovery
 
Meteor + React
Meteor + ReactMeteor + React
Meteor + React
 
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
 
Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rd
 
Agile Lab_BigData_Meetup_AKKA
Agile Lab_BigData_Meetup_AKKAAgile Lab_BigData_Meetup_AKKA
Agile Lab_BigData_Meetup_AKKA
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications
 
Java programming and security
Java programming and securityJava programming and security
Java programming and security
 
Akka.Net Overview
Akka.Net OverviewAkka.Net Overview
Akka.Net Overview
 
Nine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take youNine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take you
 
Do's and don'ts when deploying akka in production
Do's and don'ts when deploying akka in productionDo's and don'ts when deploying akka in production
Do's and don'ts when deploying akka in production
 
Building FoundationDB
Building FoundationDBBuilding FoundationDB
Building FoundationDB
 
Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...Refactor your Java EE application using Microservices and Containers - Arun G...
Refactor your Java EE application using Microservices and Containers - Arun G...
 
Solving k8s persistent workloads using k8s DevOps style
Solving k8s persistent workloads using k8s DevOps styleSolving k8s persistent workloads using k8s DevOps style
Solving k8s persistent workloads using k8s DevOps style
 

More from GlobalLogic Ukraine

GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”GlobalLogic Ukraine
 
Штучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptxШтучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptxGlobalLogic Ukraine
 
Задачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptxЗадачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptxGlobalLogic Ukraine
 
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptxЩо треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptxGlobalLogic Ukraine
 
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...GlobalLogic Ukraine
 
JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"GlobalLogic Ukraine
 
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...GlobalLogic Ukraine
 
Страх і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic EducationСтрах і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic EducationGlobalLogic Ukraine
 
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”GlobalLogic Ukraine
 
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”GlobalLogic Ukraine
 
“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?GlobalLogic Ukraine
 
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Ukraine
 
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...GlobalLogic Ukraine
 
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”GlobalLogic Ukraine
 
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"GlobalLogic Ukraine
 
GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"GlobalLogic Ukraine
 
C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"GlobalLogic Ukraine
 
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...GlobalLogic Ukraine
 
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Ukraine
 
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”GlobalLogic Ukraine
 

More from GlobalLogic Ukraine (20)

GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
 
Штучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptxШтучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptx
 
Задачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptxЗадачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptx
 
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptxЩо треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
 
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
 
JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"
 
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
 
Страх і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic EducationСтрах і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic Education
 
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
 
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
 
“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?
 
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
 
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
 
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
 
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
 
GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"
 
C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"
 
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
 
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
 
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”
 

Recently uploaded

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 

Recently uploaded (20)

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

Take a Look at Akka+Java (English version)

  • 1. TAKE A LOOK AT AKKA + JAVA Dmytro Mantula GlobalLogic, Kyiv
  • 2. PREVIOUS AGE OF COMPUTING SYSTEMS • Monolith software architecture • Managed servers and containers • RDBMS, transactions isolation • Scalability: scale-up by more powerful hardware • Proprietary enterprise solutions
  • 3. NEW CHALLENGES • response time: s -> ms • high availability: 3 nines (8h/y) -> 5+ nines (5– m/y) • storage: GBs (10 9 ) -> PBs (10 15 )+ • hardware: spread from mobile phone to 1000+ nodes cluster
  • 5. EVIL OF CPU PERFORMANCE: MOORE’S LAW DOESN’T WORK ANYMORE FOR A SINGLE CORE
  • 6. The more CPU cores a system has, the faster it is. True or false?
  • 7. EVIL OF PARALLELISM: AMDAHL’S LAW Gene Amdahl 1967
  • 8. STUBBORN AMDAHL’S LAW The speedup of a program using multiple processors in parallel computing is limited by the sequential fraction of the program.
  • 10. «Do not communicate by sharing memory. Instead, share memory by communicating» – Effective Go
  • 11. v1.0: July 2013 v2.0: Sept 2014 REACTIVE SOFTWARE DESIGN http://www.reactivemanifesto.org/
  • 12. • rapid and consistent response times • response in SLA time may be more important than late correct response • problems may be detected quickly and dealt with effectively react to users Responsive
  • 13. v1.0: July 2013 v2.0: Sept 2014 REACTIVE SOFTWARE DESIGN http://www.reactivemanifesto.org/
  • 14. react to load Elastic • No contention points or central bottlenecks • ability to shard or replicate components and distribute inputs among them • Automatic resource management • scale-up • scale-out • scale-down • scale-in
  • 15. v1.0: July 2013 v2.0: Sept 2014 REACTIVE SOFTWARE DESIGN http://www.reactivemanifesto.org/
  • 16. • “Let it crash!”: there is no way to think about every single failure point • failure is not dealt with as an error • means that some capacity of the system will be reduced • dealt with as a message react to failures Resilient
  • 17. v1.0: July 2013 v2.0: Sept 2014 REACTIVE SOFTWARE DESIGN http://www.reactivemanifesto.org/
  • 18. Asynchronous message-passing • loose coupling • isolation of components • location transparency • failures as messages Benefits: • load management • elasticity • flow control (monitoring , back-pressure) react to events Message Driven
  • 20. v1.0: July 2013 v2.0: Sept 2014 REACTIVE SOFTWARE DESIGN http://www.reactivemanifesto.org/
  • 21. CARL HEWITT, 1973 ACTOR MODEL • Describes: • message processing algorithm • data storage principles • interaction between modules • Erlang • Used in telecommunication systems • High Availability of 9 “nines”
  • 22. • Written in Scala • Stable since 2009 • Part of Scala Standard Library since 2013 • Supports Java 8 since 2014 by ex
  • 23. WHAT IS AN ACTOR? Actor is a unit of code with a mailbox and an internal state that just responds to messages in a single thread (briefly)
  • 25. IDLE TWO STATES OF ACTOR MESSAGE PROCESSING
  • 26. WHAT IS AN ACTOR? • Similar to object in OOP, but message-driven • Even more isolated than object: no explicit access exposed (hidden behind ActorRef) • no shared state • location transparent (can live in different JVMs) • Light-weight: 300B memory footprint (millions per GB) • No threads allocated in idle state • Single-threaded invocation inside, sequential message processing • Supervises children actors
  • 27. WHAT CAN ACTOR DO? • If no messages being processed: • Nothing • When message being processed (one at a time): • make local decisions • send messages to other actors (incl. sender() and self()) • do other actions with side-effects (IO, logs, DB access) • change own behavior for next messages • create more actors (and promise to supervise them)
  • 28. BENEFITS • You’re not going to have multiple threads modifying a variable at the same time. • Forget about: • Shared state • Threads • Locks, “synchronized” • Concurrent collections • wait/notify/notifyAll • Describe only business behavior in the code. • Akka and app configuration care about everything else.
  • 29. MESSAGE CLASS • Obligatory: purely-immutable • Desirably: serializable • Good practice: declared with recipient Actor class
  • 30. MESSAGE CLASS • Obligatory: purely-immutable • Desirably: serializable • Good practice: declared with recipient Actor class SCALA:
  • 32. ACTOR IN JAVA 7 Strict @Override
  • 33. ACTOR IN JAVA 7 Casting boilerplate Strict @Override
  • 34. ACTOR IN JAVA 7 Casting boilerplate Strict @Override “if” hell
  • 35. ACTOR IN JAVA 7 Casting boilerplate Strict @Override “if” hell Do not forget!!!
  • 38. Partial function Behavior as a constant ACTOR IN JAVA 8
  • 39. Partial function Behavior as a constant Type inference within lambda ACTOR IN JAVA 8
  • 40. Partial function Behavior as a constant Type inference within lambda ACTOR IN JAVA 8 Predicate
  • 43. ROUTING • RoundRobin • Random • SmallestMailbox • Broadcast • ScatterGatherFirstCompleted • (Custom)
  • 45. WHERE TO USE AKKA? • Multi-user concurrency (e.g. gambling systems) • Rule based systems (like trading systems) • Data storages with lots of write operations • Systems with high-uptime requirements (like telecom) • Processing pipelines • Streaming data • Reactive frameworks
  • 46. DERIVATIVE FRAMEWORKS/TOOLS • For testing actors: Akka TestKit • Software Transactional Memory: Akka STM • Finite State Machines: Akka FSM • Durable mailboxes & other persistence models • Akka IO, Akka Streams, Akka Cluster • Akka HTTP (ex. Spray) • Play Framework • Akka Camel, Akka Spring • Activator