SlideShare a Scribd company logo
1 of 11
Download to read offline
Brown Bag
Introduction to Akka
by Hendri Karisma
Sr. Software Development Engineer at blibli.com
Reactive Programming
Before, managed servers and container -> (now)
reactive applications :
• React to events (event-driven)
• React to load (scalable)
• React to failures (resilient)
• React to users (responsive)
Actor Mode
The actor model in computer science is a
mathematical model of concurrent computation that
treats "actors" as the universal primitives of
concurrent computation: in response to a message
that it receives, an actor can make local decisions,
create more actors, send more messages, and
determine how to respond to the next message
received. The actor model originated in 1973.
(wikipedia)
Actor Model
• Carl Hewitt et al, 1973: Actor invited for research on
artificial intelligence
• Gul Agha, 1986: Actor languages and communication
patterns
• Ericsson, 1995: first commercial use in Erlang/OTP for
telecommunication platform (5.2 minutes of downtime/year)
• Philipp Haller, 2006: implementation in scala standard librai
• Jonas Boner, 2009: creation of Akka
What is Akka
Akka is a toolkit and runtime for building highly
concurrent, distributed, and resilient message-
driven applications on the JVM. (http://akka.io/)
What is Actor
The actor model represents objects and their
interactions, resembling human organisation and
built upon the law of physics
Why Actor
When it was all about the megahertz and nobody was even thinking about the day when it
would be all about the number of cores.
hardware with a ton of cores and huge potential for concurrency, what tools do you have
to go with it? Threads, locks, mutexes, critical sections, synchronized methods, and all of
their brothers, sisters, cousins, and pets….
You and I deal with concurrency every single day. Let’s face it, your entire life is a series
of interrupts and a collection of requests and responses.
Actor Summary
• Optimizing the use of threads requires non-blocking APIs, which are rare in the wild and are also
historically cumbersome to write. 

• Dealing with errors in an asynchronous system can be difficult to manage. Traditional error-handling
strategies (exceptions and return codes) do not translate well when inside a concurrent application. 

• Controlling access to your data requires constant vigilance. Ensuring that race conditions and
deadlocks are eliminated can verge on the impossible. 

• Setting up a signaling mechanism between two objects is required in order to eliminate race conditions
and speed up wait times. 

• The complexity of most common concurrent applications can increase the cost of refactoring to a fairly
high degree. This makes complex concurrent applications accrue technical debt at a much faster rate
than their sequential counterparts. 

Parallelism vs Concurrency
Parallelism The act of modifying a seemingly sequential algorithm into a set of
mutually independent parts that can be run simultaneously, either on multiple cores or
multiple machines. For example, you can multiply thousands of matrices sequentially
but you can also do this in parallel if you break them up into a hierarchy of
multiplications.
Concurrency This is all that other stuff, also known as life. It’s the act of an application,
which has many dependent or independent algorithms, running through multiple threads
of execution simultaneously. The easiest example is that of a web service, such as
Twitter. Twitter is highly event driven, taking in tweets from millions of concurrent users
as well as events from its own internal systems. All of this stuff happens concurrently.
Akka has solid solutions for both parallelism and concurrency.
Concurrency
Shared-state concurrency
• Create some object that carries some data.
• Create some functions to operate on that data.
• Realize it’s slow. Create threads (or an ExecutorService) and refactor your code so it can run concurrently.
• Find out that you have a ton of race conditions. Protect the data with synchronization primitives.
• Scratch your head about why only 10% of your cores are being utilized. Eventually you blame the synchronization.
• Refactor again to try and increase concurrency. And so on. . .
* Deadlocks, race conditions, memory corruption, scalability bottlenecks, resource contention, and Heisenbug
Message Passing
• Has the benefit of being easier to reason about, and also easier to implement in a distributed computing system.
• Threads communicate and synchronize using three key abstractions: channels, mailboxes, and events.
• The prominent mathematical models of message passing are the Actor model and Pi calculus.
• Concurrency refers to the idea of having many actors running independently, but not necessarily all at the same
time.
Thanks…
sample code :
• bank account transfer : https://github.com/
situkangsayur/bank-account
• link checker : https://github.com/situkangsayur/
link-checker

More Related Content

Viewers also liked

JavaOne LATAM 2016 - RESTful Services Simplificado com Spring Data REST
JavaOne LATAM 2016 - RESTful Services Simplificado com Spring Data RESTJavaOne LATAM 2016 - RESTful Services Simplificado com Spring Data REST
JavaOne LATAM 2016 - RESTful Services Simplificado com Spring Data RESTRodrigo Cândido da Silva
 
Recommendations for Complex Digital Asset Management
Recommendations for Complex Digital Asset ManagementRecommendations for Complex Digital Asset Management
Recommendations for Complex Digital Asset ManagementNuxeo
 
Intro To React Native
Intro To React NativeIntro To React Native
Intro To React NativeFITC
 
El libro de la folklre, partituras de folclore.Folklre Book.
El libro de la folklre, partituras de folclore.Folklre Book.El libro de la folklre, partituras de folclore.Folklre Book.
El libro de la folklre, partituras de folclore.Folklre Book.Brayan Paúl Moreno Arce
 
Συμμετοχή του 6ου Γυμνασίου Σερρών στον Διαγωνισμό Επιχειρηματικότητας 2015-2...
Συμμετοχή του 6ου Γυμνασίου Σερρών στον Διαγωνισμό Επιχειρηματικότητας 2015-2...Συμμετοχή του 6ου Γυμνασίου Σερρών στον Διαγωνισμό Επιχειρηματικότητας 2015-2...
Συμμετοχή του 6ου Γυμνασίου Σερρών στον Διαγωνισμό Επιχειρηματικότητας 2015-2...KESYPSERRON
 
JakartaJS - How I Learn Javascript From Basic
JakartaJS - How I Learn Javascript From BasicJakartaJS - How I Learn Javascript From Basic
JakartaJS - How I Learn Javascript From BasicIrfan Maulana
 

Viewers also liked (8)

JavaOne LATAM 2016 - RESTful Services Simplificado com Spring Data REST
JavaOne LATAM 2016 - RESTful Services Simplificado com Spring Data RESTJavaOne LATAM 2016 - RESTful Services Simplificado com Spring Data REST
JavaOne LATAM 2016 - RESTful Services Simplificado com Spring Data REST
 
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
Javantura v3 - ES6 – Future Is Now – Nenad PečanacJavantura v3 - ES6 – Future Is Now – Nenad Pečanac
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
 
Recommendations for Complex Digital Asset Management
Recommendations for Complex Digital Asset ManagementRecommendations for Complex Digital Asset Management
Recommendations for Complex Digital Asset Management
 
John petrucci rock discipline
John petrucci   rock disciplineJohn petrucci   rock discipline
John petrucci rock discipline
 
Intro To React Native
Intro To React NativeIntro To React Native
Intro To React Native
 
El libro de la folklre, partituras de folclore.Folklre Book.
El libro de la folklre, partituras de folclore.Folklre Book.El libro de la folklre, partituras de folclore.Folklre Book.
El libro de la folklre, partituras de folclore.Folklre Book.
 
Συμμετοχή του 6ου Γυμνασίου Σερρών στον Διαγωνισμό Επιχειρηματικότητας 2015-2...
Συμμετοχή του 6ου Γυμνασίου Σερρών στον Διαγωνισμό Επιχειρηματικότητας 2015-2...Συμμετοχή του 6ου Γυμνασίου Σερρών στον Διαγωνισμό Επιχειρηματικότητας 2015-2...
Συμμετοχή του 6ου Γυμνασίου Σερρών στον Διαγωνισμό Επιχειρηματικότητας 2015-2...
 
JakartaJS - How I Learn Javascript From Basic
JakartaJS - How I Learn Javascript From BasicJakartaJS - How I Learn Javascript From Basic
JakartaJS - How I Learn Javascript From Basic
 

Similar to Sharing-akka-pub

Actor model in F# and Akka.NET
Actor model in F# and Akka.NETActor model in F# and Akka.NET
Actor model in F# and Akka.NETRiccardo Terrell
 
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016DevOpsDays Tel Aviv
 
Designing distributed systems
Designing distributed systemsDesigning distributed systems
Designing distributed systemsMalisa Ncube
 
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...VAISHNAVI MADHAN
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examplesPeter Lawrey
 
Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...
Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...
Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...confluent
 
Intro to distributed systems
Intro to distributed systemsIntro to distributed systems
Intro to distributed systemsAhmed Soliman
 
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...KRamasamy2
 
Software and the Concurrency Revolution : Notes
Software and the Concurrency Revolution : NotesSoftware and the Concurrency Revolution : Notes
Software and the Concurrency Revolution : NotesSubhajit Sahu
 
Distributed systems and scalability rules
Distributed systems and scalability rulesDistributed systems and scalability rules
Distributed systems and scalability rulesOleg Tsal-Tsalko
 
CrawlerLD - Distributed crawler for linked data
CrawlerLD - Distributed crawler for linked dataCrawlerLD - Distributed crawler for linked data
CrawlerLD - Distributed crawler for linked dataRaphael do Vale
 
Being Elastic -- Evolving Programming for the Cloud
Being Elastic -- Evolving Programming for the CloudBeing Elastic -- Evolving Programming for the Cloud
Being Elastic -- Evolving Programming for the CloudRandy Shoup
 
Chapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptxChapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptxTekle12
 
"Hints" talk at Walchand College Sangli, March 2017
"Hints" talk at Walchand College Sangli, March 2017"Hints" talk at Walchand College Sangli, March 2017
"Hints" talk at Walchand College Sangli, March 2017Neeran Karnik
 
Reactive programming
Reactive programmingReactive programming
Reactive programmingSUDIP GHOSH
 
Coding For Cores - C# Way
Coding For Cores - C# WayCoding For Cores - C# Way
Coding For Cores - C# WayBishnu Rawal
 
Operating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxOperating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxPrudhvi668506
 
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, SparkBuilding Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, SparkTodd Fritz
 

Similar to Sharing-akka-pub (20)

Actor model in F# and Akka.NET
Actor model in F# and Akka.NETActor model in F# and Akka.NET
Actor model in F# and Akka.NET
 
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
 
Designing distributed systems
Designing distributed systemsDesigning distributed systems
Designing distributed systems
 
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
 
Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...
Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...
Hard Truths About Streaming and Eventing (Dan Rosanova, Microsoft) Kafka Summ...
 
Intro to distributed systems
Intro to distributed systemsIntro to distributed systems
Intro to distributed systems
 
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
 
Software and the Concurrency Revolution : Notes
Software and the Concurrency Revolution : NotesSoftware and the Concurrency Revolution : Notes
Software and the Concurrency Revolution : Notes
 
Distributed systems and scalability rules
Distributed systems and scalability rulesDistributed systems and scalability rules
Distributed systems and scalability rules
 
CrawlerLD - Distributed crawler for linked data
CrawlerLD - Distributed crawler for linked dataCrawlerLD - Distributed crawler for linked data
CrawlerLD - Distributed crawler for linked data
 
Introduction
IntroductionIntroduction
Introduction
 
Being Elastic -- Evolving Programming for the Cloud
Being Elastic -- Evolving Programming for the CloudBeing Elastic -- Evolving Programming for the Cloud
Being Elastic -- Evolving Programming for the Cloud
 
Chapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptxChapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptx
 
"Hints" talk at Walchand College Sangli, March 2017
"Hints" talk at Walchand College Sangli, March 2017"Hints" talk at Walchand College Sangli, March 2017
"Hints" talk at Walchand College Sangli, March 2017
 
Reactive programming
Reactive programmingReactive programming
Reactive programming
 
CLUSTER COMPUTING
CLUSTER COMPUTINGCLUSTER COMPUTING
CLUSTER COMPUTING
 
Coding For Cores - C# Way
Coding For Cores - C# WayCoding For Cores - C# Way
Coding For Cores - C# Way
 
Operating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxOperating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptx
 
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, SparkBuilding Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
 

More from Hendri Karisma

Data - Science and Engineering slide at Bandungpy Sharing Session
Data - Science and Engineering slide at Bandungpy Sharing SessionData - Science and Engineering slide at Bandungpy Sharing Session
Data - Science and Engineering slide at Bandungpy Sharing SessionHendri Karisma
 
ML Abstraciton for Keras to Serve Several Cases
ML Abstraciton for Keras to Serve Several CasesML Abstraciton for Keras to Serve Several Cases
ML Abstraciton for Keras to Serve Several CasesHendri Karisma
 
Data Analytics Today - Data, Tech, and Regulation.pdf
Data Analytics Today - Data, Tech, and Regulation.pdfData Analytics Today - Data, Tech, and Regulation.pdf
Data Analytics Today - Data, Tech, and Regulation.pdfHendri Karisma
 
Python 101 - Indonesia AI Society.pdf
Python 101 - Indonesia AI Society.pdfPython 101 - Indonesia AI Society.pdf
Python 101 - Indonesia AI Society.pdfHendri Karisma
 
Slide DevSecOps Microservices
Slide DevSecOps Microservices Slide DevSecOps Microservices
Slide DevSecOps Microservices Hendri Karisma
 
Machine Learning: an Introduction and cases
Machine Learning: an Introduction and casesMachine Learning: an Introduction and cases
Machine Learning: an Introduction and casesHendri Karisma
 
Python, Data science, and Unsupervised learning
Python, Data science, and Unsupervised learningPython, Data science, and Unsupervised learning
Python, Data science, and Unsupervised learningHendri Karisma
 
Machine Learning Research in blibli
Machine Learning Research in blibliMachine Learning Research in blibli
Machine Learning Research in blibliHendri Karisma
 
Comparison Study of Neural Network and Deep Neural Network on Repricing GAP P...
Comparison Study of Neural Network and Deep Neural Network on Repricing GAP P...Comparison Study of Neural Network and Deep Neural Network on Repricing GAP P...
Comparison Study of Neural Network and Deep Neural Network on Repricing GAP P...Hendri Karisma
 
Fraud Detection System using Deep Neural Networks
Fraud Detection System using Deep Neural NetworksFraud Detection System using Deep Neural Networks
Fraud Detection System using Deep Neural NetworksHendri Karisma
 
Artificial Intelligence and The Complexity
Artificial Intelligence and The ComplexityArtificial Intelligence and The Complexity
Artificial Intelligence and The ComplexityHendri Karisma
 
Software Engineering: Today in The Betlefield
Software Engineering: Today in The BetlefieldSoftware Engineering: Today in The Betlefield
Software Engineering: Today in The BetlefieldHendri Karisma
 
Introduction to Topological Data Analysis
Introduction to Topological Data AnalysisIntroduction to Topological Data Analysis
Introduction to Topological Data AnalysisHendri Karisma
 
Presentasi cca it now and tomorow
Presentasi cca it now and tomorowPresentasi cca it now and tomorow
Presentasi cca it now and tomorowHendri Karisma
 
Slide Presentasi EM Algorithm (Play Tennis & Brain Tissue Segmentation)
Slide Presentasi EM Algorithm (Play Tennis & Brain Tissue Segmentation)Slide Presentasi EM Algorithm (Play Tennis & Brain Tissue Segmentation)
Slide Presentasi EM Algorithm (Play Tennis & Brain Tissue Segmentation)Hendri Karisma
 
Slide Presentasi Kelompok E bagian Sistem Rekognisi
Slide Presentasi Kelompok E bagian Sistem RekognisiSlide Presentasi Kelompok E bagian Sistem Rekognisi
Slide Presentasi Kelompok E bagian Sistem RekognisiHendri Karisma
 
Slide Presentasi Kelompok Keilmuan E
Slide Presentasi Kelompok Keilmuan ESlide Presentasi Kelompok Keilmuan E
Slide Presentasi Kelompok Keilmuan EHendri Karisma
 
Slide Seminar Open Source (CodeLabs UNIKOM Bandung)
Slide Seminar Open Source (CodeLabs UNIKOM Bandung)Slide Seminar Open Source (CodeLabs UNIKOM Bandung)
Slide Seminar Open Source (CodeLabs UNIKOM Bandung)Hendri Karisma
 

More from Hendri Karisma (19)

Data - Science and Engineering slide at Bandungpy Sharing Session
Data - Science and Engineering slide at Bandungpy Sharing SessionData - Science and Engineering slide at Bandungpy Sharing Session
Data - Science and Engineering slide at Bandungpy Sharing Session
 
ML Abstraciton for Keras to Serve Several Cases
ML Abstraciton for Keras to Serve Several CasesML Abstraciton for Keras to Serve Several Cases
ML Abstraciton for Keras to Serve Several Cases
 
Data Analytics Today - Data, Tech, and Regulation.pdf
Data Analytics Today - Data, Tech, and Regulation.pdfData Analytics Today - Data, Tech, and Regulation.pdf
Data Analytics Today - Data, Tech, and Regulation.pdf
 
Python 101 - Indonesia AI Society.pdf
Python 101 - Indonesia AI Society.pdfPython 101 - Indonesia AI Society.pdf
Python 101 - Indonesia AI Society.pdf
 
Slide DevSecOps Microservices
Slide DevSecOps Microservices Slide DevSecOps Microservices
Slide DevSecOps Microservices
 
Machine Learning: an Introduction and cases
Machine Learning: an Introduction and casesMachine Learning: an Introduction and cases
Machine Learning: an Introduction and cases
 
Python, Data science, and Unsupervised learning
Python, Data science, and Unsupervised learningPython, Data science, and Unsupervised learning
Python, Data science, and Unsupervised learning
 
Machine Learning Research in blibli
Machine Learning Research in blibliMachine Learning Research in blibli
Machine Learning Research in blibli
 
Comparison Study of Neural Network and Deep Neural Network on Repricing GAP P...
Comparison Study of Neural Network and Deep Neural Network on Repricing GAP P...Comparison Study of Neural Network and Deep Neural Network on Repricing GAP P...
Comparison Study of Neural Network and Deep Neural Network on Repricing GAP P...
 
Fraud Detection System using Deep Neural Networks
Fraud Detection System using Deep Neural NetworksFraud Detection System using Deep Neural Networks
Fraud Detection System using Deep Neural Networks
 
Artificial Intelligence and The Complexity
Artificial Intelligence and The ComplexityArtificial Intelligence and The Complexity
Artificial Intelligence and The Complexity
 
Software Engineering: Today in The Betlefield
Software Engineering: Today in The BetlefieldSoftware Engineering: Today in The Betlefield
Software Engineering: Today in The Betlefield
 
Introduction to Topological Data Analysis
Introduction to Topological Data AnalysisIntroduction to Topological Data Analysis
Introduction to Topological Data Analysis
 
Presentasi cca it now and tomorow
Presentasi cca it now and tomorowPresentasi cca it now and tomorow
Presentasi cca it now and tomorow
 
Bayes Belief Network
Bayes Belief NetworkBayes Belief Network
Bayes Belief Network
 
Slide Presentasi EM Algorithm (Play Tennis & Brain Tissue Segmentation)
Slide Presentasi EM Algorithm (Play Tennis & Brain Tissue Segmentation)Slide Presentasi EM Algorithm (Play Tennis & Brain Tissue Segmentation)
Slide Presentasi EM Algorithm (Play Tennis & Brain Tissue Segmentation)
 
Slide Presentasi Kelompok E bagian Sistem Rekognisi
Slide Presentasi Kelompok E bagian Sistem RekognisiSlide Presentasi Kelompok E bagian Sistem Rekognisi
Slide Presentasi Kelompok E bagian Sistem Rekognisi
 
Slide Presentasi Kelompok Keilmuan E
Slide Presentasi Kelompok Keilmuan ESlide Presentasi Kelompok Keilmuan E
Slide Presentasi Kelompok Keilmuan E
 
Slide Seminar Open Source (CodeLabs UNIKOM Bandung)
Slide Seminar Open Source (CodeLabs UNIKOM Bandung)Slide Seminar Open Source (CodeLabs UNIKOM Bandung)
Slide Seminar Open Source (CodeLabs UNIKOM Bandung)
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - 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
 
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
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - 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
 
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
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Sharing-akka-pub

  • 1. Brown Bag Introduction to Akka by Hendri Karisma Sr. Software Development Engineer at blibli.com
  • 2. Reactive Programming Before, managed servers and container -> (now) reactive applications : • React to events (event-driven) • React to load (scalable) • React to failures (resilient) • React to users (responsive)
  • 3. Actor Mode The actor model in computer science is a mathematical model of concurrent computation that treats "actors" as the universal primitives of concurrent computation: in response to a message that it receives, an actor can make local decisions, create more actors, send more messages, and determine how to respond to the next message received. The actor model originated in 1973. (wikipedia)
  • 4. Actor Model • Carl Hewitt et al, 1973: Actor invited for research on artificial intelligence • Gul Agha, 1986: Actor languages and communication patterns • Ericsson, 1995: first commercial use in Erlang/OTP for telecommunication platform (5.2 minutes of downtime/year) • Philipp Haller, 2006: implementation in scala standard librai • Jonas Boner, 2009: creation of Akka
  • 5. What is Akka Akka is a toolkit and runtime for building highly concurrent, distributed, and resilient message- driven applications on the JVM. (http://akka.io/)
  • 6. What is Actor The actor model represents objects and their interactions, resembling human organisation and built upon the law of physics
  • 7. Why Actor When it was all about the megahertz and nobody was even thinking about the day when it would be all about the number of cores. hardware with a ton of cores and huge potential for concurrency, what tools do you have to go with it? Threads, locks, mutexes, critical sections, synchronized methods, and all of their brothers, sisters, cousins, and pets…. You and I deal with concurrency every single day. Let’s face it, your entire life is a series of interrupts and a collection of requests and responses.
  • 8. Actor Summary • Optimizing the use of threads requires non-blocking APIs, which are rare in the wild and are also historically cumbersome to write. 
 • Dealing with errors in an asynchronous system can be difficult to manage. Traditional error-handling strategies (exceptions and return codes) do not translate well when inside a concurrent application. 
 • Controlling access to your data requires constant vigilance. Ensuring that race conditions and deadlocks are eliminated can verge on the impossible. 
 • Setting up a signaling mechanism between two objects is required in order to eliminate race conditions and speed up wait times. 
 • The complexity of most common concurrent applications can increase the cost of refactoring to a fairly high degree. This makes complex concurrent applications accrue technical debt at a much faster rate than their sequential counterparts. 

  • 9. Parallelism vs Concurrency Parallelism The act of modifying a seemingly sequential algorithm into a set of mutually independent parts that can be run simultaneously, either on multiple cores or multiple machines. For example, you can multiply thousands of matrices sequentially but you can also do this in parallel if you break them up into a hierarchy of multiplications. Concurrency This is all that other stuff, also known as life. It’s the act of an application, which has many dependent or independent algorithms, running through multiple threads of execution simultaneously. The easiest example is that of a web service, such as Twitter. Twitter is highly event driven, taking in tweets from millions of concurrent users as well as events from its own internal systems. All of this stuff happens concurrently. Akka has solid solutions for both parallelism and concurrency.
  • 10. Concurrency Shared-state concurrency • Create some object that carries some data. • Create some functions to operate on that data. • Realize it’s slow. Create threads (or an ExecutorService) and refactor your code so it can run concurrently. • Find out that you have a ton of race conditions. Protect the data with synchronization primitives. • Scratch your head about why only 10% of your cores are being utilized. Eventually you blame the synchronization. • Refactor again to try and increase concurrency. And so on. . . * Deadlocks, race conditions, memory corruption, scalability bottlenecks, resource contention, and Heisenbug Message Passing • Has the benefit of being easier to reason about, and also easier to implement in a distributed computing system. • Threads communicate and synchronize using three key abstractions: channels, mailboxes, and events. • The prominent mathematical models of message passing are the Actor model and Pi calculus. • Concurrency refers to the idea of having many actors running independently, but not necessarily all at the same time.
  • 11. Thanks… sample code : • bank account transfer : https://github.com/ situkangsayur/bank-account • link checker : https://github.com/situkangsayur/ link-checker