SlideShare a Scribd company logo
The Actor Model
1
An alternative approach to concurrency
Lorenzo Nicora
Senior Consultant @ OpenCredo
@nicusX
https://opencredo.com/author/lorenzo/
✓ (1973) Carl Hewitt: “A Universal Modular Actor Formalism for Artificial Intelligence”
2
A bit of History…
1973
2009
✓ (2009) Akka toolkit, Scala/Java
✓ (1986) Ericsson: Erlang
Lorenzo Nicora Actor Model
According to Alan Kay,
author of Smalltalk 

and inventor of the “Object-Orientation”:
3
The original idea of Object
An “Object”
✓ Is the basic unit of object-oriented system
✓ Has its own state
✓ Communicate with others 

by sending and receiving messages*
* in Java, C++, C# (derived from Simula, not Smalltalk)
Objects interact by invoking methods
1980
Lorenzo Nicora Actor Model
An “Actor” 

is a computational entity that, 

in response to a message it receives, 

can concurrently:
a) Send a finite number of messages to other actors
b) Create a finite number of new actors
c) Designate the behaviour to be used for the next message
it receives. [implies a state]
4
The Actor
Actor
Actor
Actor
Mailbox Mailbox
Mailbox
Lorenzo Nicora Actor Model
Actors interacts 

only by messaging
Actors react to 

messages
5
Actors are Reactive
Lorenzo Nicora Actor Model
An Actor handles one message a time
Never concurrently
An Actor has a state
State cannot be modified from outside the actor
6
Thread-safe
An Actor is inherently thread-safe
No Lock/Synchronisation on State
Lorenzo Nicora Actor Model
7
Supervision
Actors are created by Actors 

Parent -> Child
Lorenzo Nicora Actor Model
8
Supervision
Failure Handling
• If a Child throws an Exception, the Supervisor get notified
• Supervision Strategy: e.g. relaunch, abandon…
Failure is always handled consistently
Parent = Supervisor
Lorenzo Nicora Actor Model
9
Lightweight
Actor is lightweight
Creating an Actor has little overhead
beyond creating an Object
Lorenzo Nicora Actor Model
Non-blocking implementation
of Request/Response pattern 

with multiple downstream collaborators
10
Example: Non-blocking Request/Response
• One-Actor-per-Request pattern
• Enterprise Integration Patterns:
✴ Request/Reply
✴ Return Address
✴ Scatter-Gather, Aggregators
✴ Round-robin Message Router
Lorenzo Nicora Actor Model
11
Example: Non-blocking Request/Response
Lorenzo Nicora Actor Model
12
Example: Non-blocking Request/Response
Lorenzo Nicora Actor Model
13
Example: Non-blocking Request/Response
Lorenzo Nicora Actor Model
14
Example: Non-blocking Request/Response
Lorenzo Nicora Actor Model
15
Example: Non-blocking Request/Response
Lorenzo Nicora Actor Model
16
Example: Non-blocking Request/Response
Lorenzo Nicora Actor Model
17
Example: Non-blocking Request/Response
Lorenzo Nicora Actor Model
18
Example: Non-blocking Request/Response
Lorenzo Nicora Actor Model
19
Example: Non-blocking Request/Response
Lorenzo Nicora Actor Model
20
Example: Non-blocking Request/Response
Lorenzo Nicora Actor Model
21
Example: Non-blocking Request/Response
Lorenzo Nicora Actor Model
22
Conclusions
Actor model: 

an alternative approach to concurrency

Actors, Threads
+ Business logic implementation + 

inherently thread-safe
- A new programming paradigm - 

to learn
Lorenzo Nicora Actor Model
23
Lorenzo Nicora Actor Model

More Related Content

PDF
Haufe #msaday - Building a Microservice Ecosystem by Daniel Bryant
PDF
Haufe #msaday - Seven More Deadly Sins of Microservices by Daniel Bryant
PDF
Voxxed Bristol 2017 - From C to Q, one event at a time: Event Sourcing illust...
PDF
Reactive Microservices By Lorenzo Nicora
PPTX
O'Reilly 2016: "Continuous Delivery with Containers: The Trials and Tribulati...
PDF
QCON London 2017 - Monitoring Serverless Architectures by Rafal Gancarz
PDF
London Hashicorp Meetup #8 - Testing Programmable Infrastructure By Matt Long
PDF
GOTO LONDON 2016: Concursus Event sourcing Evolved (Updated)
Haufe #msaday - Building a Microservice Ecosystem by Daniel Bryant
Haufe #msaday - Seven More Deadly Sins of Microservices by Daniel Bryant
Voxxed Bristol 2017 - From C to Q, one event at a time: Event Sourcing illust...
Reactive Microservices By Lorenzo Nicora
O'Reilly 2016: "Continuous Delivery with Containers: The Trials and Tribulati...
QCON London 2017 - Monitoring Serverless Architectures by Rafal Gancarz
London Hashicorp Meetup #8 - Testing Programmable Infrastructure By Matt Long
GOTO LONDON 2016: Concursus Event sourcing Evolved (Updated)

Viewers also liked (20)

PDF
Evolving Project Management: from the sin to the virtue by Antonio Cobo
PDF
ServerlessConf: Serverless for the Enterprise - Rafal Gancarz
PDF
High Load Strategy 2016 - Project Management: from Stone Age to DevOps
PDF
A Visual Introduction to Event Sourcing and CQRS by Lorenzo Nicora
PDF
muCon 2016: Authentication in Microservice Systems By David Borsos
PDF
Microservices Manchester: Microservices and Macro-Economics - A Shorty Histor...
PDF
Vault: Beyond secret storage - Using Vault to harden your infrastructure
PDF
Microservices Manchester: Security, Microservces and Vault by Nicki Watt
PPTX
Microservices Manchester: Authentication in Microservice Systems by David Borsos
PDF
Spring Boot Microservices vs Akka Actor Cluster
PPTX
New microsoft office power point presentation copy
 
PPT
Thesis Presentation Ppt Slides 11 18 2011
PPTX
ThingMonk 2016 - Concursus Event sourcing for the IOT By Tareq Abedrabbo & Do...
PDF
Chronix as Long-Term Storage for Prometheus
PDF
Internet And Self-organizing1
PPT
Gebeurtenis
PDF
Why?What?How?
DOC
Lesson level ! of English
PDF
Addgene
PPTX
Motywacja użytkowników e-szkoleń
Evolving Project Management: from the sin to the virtue by Antonio Cobo
ServerlessConf: Serverless for the Enterprise - Rafal Gancarz
High Load Strategy 2016 - Project Management: from Stone Age to DevOps
A Visual Introduction to Event Sourcing and CQRS by Lorenzo Nicora
muCon 2016: Authentication in Microservice Systems By David Borsos
Microservices Manchester: Microservices and Macro-Economics - A Shorty Histor...
Vault: Beyond secret storage - Using Vault to harden your infrastructure
Microservices Manchester: Security, Microservces and Vault by Nicki Watt
Microservices Manchester: Authentication in Microservice Systems by David Borsos
Spring Boot Microservices vs Akka Actor Cluster
New microsoft office power point presentation copy
 
Thesis Presentation Ppt Slides 11 18 2011
ThingMonk 2016 - Concursus Event sourcing for the IOT By Tareq Abedrabbo & Do...
Chronix as Long-Term Storage for Prometheus
Internet And Self-organizing1
Gebeurtenis
Why?What?How?
Lesson level ! of English
Addgene
Motywacja użytkowników e-szkoleń
Ad

Similar to Haufe #msaday - The Actor model: an alternative approach to concurrency By Lorenzo Nicora (20)

PPTX
DDD loves Actor Model and Actor Model loves Elixir
PPTX
Actor Model & Reactive Manifesto
PPTX
The Problematic Situation Aspect of Conceptual Design
PPTX
Why the use case
PPTX
CarolinaCon Presentation on Streaming Analytics
PDF
How To Write A Case Study Essay. Online assignment writing service.
ODP
Actors, Fault tolerance and OTP
PDF
Dive into Akka Actors
PDF
Revising Your Argument - Excelsior College OWL
PDF
Holland & Barrett: Gen AI Prompt Engineering for Tech teams
PDF
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
PPT
week0 on robotics of human kind by journal.ppt
PPT
bodhisatttaghosh999999999999999999999998
PPT
Design_Patterns_Dr.CM.ppt
PDF
רועי פלד
PPT
Introduction to Design Patterns and Singleton
PDF
Beyond Fault Tolerance with Actor Programming
PDF
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
PDF
Effect systems in scala: beyond flatmap
PPTX
OOP History and Core Concepts
DDD loves Actor Model and Actor Model loves Elixir
Actor Model & Reactive Manifesto
The Problematic Situation Aspect of Conceptual Design
Why the use case
CarolinaCon Presentation on Streaming Analytics
How To Write A Case Study Essay. Online assignment writing service.
Actors, Fault tolerance and OTP
Dive into Akka Actors
Revising Your Argument - Excelsior College OWL
Holland & Barrett: Gen AI Prompt Engineering for Tech teams
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
week0 on robotics of human kind by journal.ppt
bodhisatttaghosh999999999999999999999998
Design_Patterns_Dr.CM.ppt
רועי פלד
Introduction to Design Patterns and Singleton
Beyond Fault Tolerance with Actor Programming
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Effect systems in scala: beyond flatmap
OOP History and Core Concepts
Ad

More from OpenCredo (12)

PDF
Webinar - Design Thinking for Platform Engineering
PDF
MuCon 2019: Exploring Your Microservices Architecture Through Network Science...
PDF
Goto Chicago; Journeys To Cloud Native Architecture: Sun, Sea And Emergencies...
PPTX
Mucon 2018: Heuristics for Identifying Microservice Boundaries By Erich Eichi...
PDF
Journeys To Cloud Native Architecture: Sun, Sea And Emergencies - Nicki Watt
PDF
Machine Learning Game Changer for IT - Maartens Lourens
PDF
Kafka Summit 2018: A Journey Building Kafka Connectors - Pegerto Fernandez
PDF
MuCon 2017: A not So(A) Trivial Question by Tareq Abedrabbo
PDF
DevOpsCon Berlin 2017: Project Management from Stone Age to DevOps By Antoni...
PDF
Hashidays London 2017 - Evolving your Infrastructure with Terraform By Nicki ...
PDF
Succeeding with DevOps Transformation - Rafal Gancarz
PDF
Progscon 2017: Serverless Architectures - Rafal Gancarz
Webinar - Design Thinking for Platform Engineering
MuCon 2019: Exploring Your Microservices Architecture Through Network Science...
Goto Chicago; Journeys To Cloud Native Architecture: Sun, Sea And Emergencies...
Mucon 2018: Heuristics for Identifying Microservice Boundaries By Erich Eichi...
Journeys To Cloud Native Architecture: Sun, Sea And Emergencies - Nicki Watt
Machine Learning Game Changer for IT - Maartens Lourens
Kafka Summit 2018: A Journey Building Kafka Connectors - Pegerto Fernandez
MuCon 2017: A not So(A) Trivial Question by Tareq Abedrabbo
DevOpsCon Berlin 2017: Project Management from Stone Age to DevOps By Antoni...
Hashidays London 2017 - Evolving your Infrastructure with Terraform By Nicki ...
Succeeding with DevOps Transformation - Rafal Gancarz
Progscon 2017: Serverless Architectures - Rafal Gancarz

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPT
Teaching material agriculture food technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Electronic commerce courselecture one. Pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Chapter 3 Spatial Domain Image Processing.pdf
NewMind AI Weekly Chronicles - August'25 Week I
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Big Data Technologies - Introduction.pptx
Spectral efficient network and resource selection model in 5G networks
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Empathic Computing: Creating Shared Understanding
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Teaching material agriculture food technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Electronic commerce courselecture one. Pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication

Haufe #msaday - The Actor model: an alternative approach to concurrency By Lorenzo Nicora