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

Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 

Recently uploaded (20)

Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 

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