SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
ACTOR MODEL
A DIFFERENT CONCURRENCY APPROACH
Emre Akış
@akisemre
• CONCURRENCY MODELS
• HISTORY
• CONCEPTS
• +‘s & -’s
• ECOSYSTEM
• RESOURCES
• CONCURRENCY MODELS
• HISTORY
• CONCEPTS
• +‘s & -’s
• ECOSYSTEM
• RESOURCES
• Sequential
• Concurrent
• Parallel
• Mixed
* http://leakfromjavaheap.blogspot.com.tr/2016/05/concurrency-vs-parallelism.html
• CONCURRENCY MODELS
• HISTORY
• CONCEPTS
• +‘s & -’s
• ECOSYSTEM
• RESOURCES
• 1973, Carl Hewitt
• 1986, Gul Agha
• 1995, Ericsson : First Commercial Use
• 2009, Jonas Boner
• CONCURRENCY MODELS
• HISTORY
• CONCEPTS
• +‘s & -’s
• ECOSYSTEM
• RESOURCES
• 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.
• Encapsulated state
• Behaviour
• Indepedent control
• Mailbox
http://brianrepko.github.io/presentation-big-data-bioinfo/images/actor-model.png
Address
• Identifies an actor
• May also represent a proxy/forwarder to an an Actor
• Contains location and transport information
• Location transparency
Address
• One actor may represent many actors (pool)
• One actor may have many address
Load
Balancer
Actor
Actor
Actor
Actor
Machine 1
Machine 2
Actor Actor Actor
X
Y
Z
• Each actor has its own process (not intended
as an OS process) and they don’t share state
between them.
• Actors can change their own states.
• Actors can create other actors and when they
do that they receive back the new actor
address.
• Actor exchange messages in an asynchronous
fashion.
Handling Errors
• Supervision : The running state of an actor is
monitored and managed by another actor (Supervisor)
https://petabridge.com/blog/how-actors-recover-from-failure-hierarchy-and-supervision/
• Address does not change during restarts
• Mailboxes are persisted outside the actor
instances
http://getakka.net/docs/concepts/actors
• CONCURRENCY MODELS
• HISTORY
• CONCEPTS
• +‘s & -’s
• ECOSYSTEM
• RESOURCES
• No shared memory and therefore locking is
not required.
• Race conditions greatly reduced.
• It greatly simplifies the control flow of a
program, each actor has its own process
(flow of control)
• Easy to distribute, across cores, across
program boundaries, across machines.
• It simplifies error handling code.
• It makes it easier to build fault-tolerant
systems.
• Too many actors ( Tracing )
• Testing
• Debugging
• Don’t work well when
• shared state needed
• need to achieve global consensus
• synchronous behaviour is needed
• CONCURRENCY MODELS
• HISTORY
• CONCEPTS
• +‘s & -’s
• ECOSYSTEM
• RESOURCES
• T https://azure.microsoft.com/en-us/blog/use-actors-to-talk-to-millions/
• F https://www.facebook.com/notes/facebook-engineering/facebook-chat/14218138919/
• W https://www.wired.com/2015/09/whatsapp-serves-900-million-users-50-engineers/
• sas
• CONCURRENCY MODELS
• HISTORY
• CONCEPTS
• +‘s & -’s
• ECOSYSTEM
• RESOURCES
• https://en.wikipedia.org/wiki/Actor_model
• http://wiki.c2.com/?ActorsModel
• Hewitt, Meijer and Szyperski: The Actor Model @
•
•
•
Actor Model Concurrency Approach

Contenu connexe

Tendances

Scripting Your Qt Application
Scripting Your Qt ApplicationScripting Your Qt Application
Scripting Your Qt Applicationaccount inactive
 
Meetup angular http client
Meetup angular http clientMeetup angular http client
Meetup angular http clientGaurav Madaan
 
Java 8 Stream API. A different way to process collections.
Java 8 Stream API. A different way to process collections.Java 8 Stream API. A different way to process collections.
Java 8 Stream API. A different way to process collections.David Gómez García
 
Kotlin as a Better Java
Kotlin as a Better JavaKotlin as a Better Java
Kotlin as a Better JavaGarth Gilmour
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
Collections in Java
Collections in JavaCollections in Java
Collections in JavaKhasim Cise
 
Practical Operation Automation with StackStorm
Practical Operation Automation with StackStormPractical Operation Automation with StackStorm
Practical Operation Automation with StackStormShu Sugimoto
 
Project Orleans - Actor Model framework
Project Orleans - Actor Model frameworkProject Orleans - Actor Model framework
Project Orleans - Actor Model frameworkNeil Mackenzie
 
PHP Cookies and Sessions
PHP Cookies and SessionsPHP Cookies and Sessions
PHP Cookies and SessionsNisa Soomro
 
Rust system programming language
Rust system programming languageRust system programming language
Rust system programming languagerobin_sy
 
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafSpring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafThymeleaf
 
JavaScript - Chapter 4 - Types and Statements
 JavaScript - Chapter 4 - Types and Statements JavaScript - Chapter 4 - Types and Statements
JavaScript - Chapter 4 - Types and StatementsWebStackAcademy
 
Authorization and Authentication in Microservice Environments
Authorization and Authentication in Microservice EnvironmentsAuthorization and Authentication in Microservice Environments
Authorization and Authentication in Microservice EnvironmentsLeanIX GmbH
 
JavaScript: Variables and Functions
JavaScript: Variables and FunctionsJavaScript: Variables and Functions
JavaScript: Variables and FunctionsJussi Pohjolainen
 

Tendances (20)

JS Event Loop
JS Event LoopJS Event Loop
JS Event Loop
 
Scripting Your Qt Application
Scripting Your Qt ApplicationScripting Your Qt Application
Scripting Your Qt Application
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
Meetup angular http client
Meetup angular http clientMeetup angular http client
Meetup angular http client
 
Java 8 Stream API. A different way to process collections.
Java 8 Stream API. A different way to process collections.Java 8 Stream API. A different way to process collections.
Java 8 Stream API. A different way to process collections.
 
Kotlin as a Better Java
Kotlin as a Better JavaKotlin as a Better Java
Kotlin as a Better Java
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Collections in Java
Collections in JavaCollections in Java
Collections in Java
 
Practical Operation Automation with StackStorm
Practical Operation Automation with StackStormPractical Operation Automation with StackStorm
Practical Operation Automation with StackStorm
 
Java Concurrency by Example
Java Concurrency by ExampleJava Concurrency by Example
Java Concurrency by Example
 
Project Orleans - Actor Model framework
Project Orleans - Actor Model frameworkProject Orleans - Actor Model framework
Project Orleans - Actor Model framework
 
PHP Cookies and Sessions
PHP Cookies and SessionsPHP Cookies and Sessions
PHP Cookies and Sessions
 
Handling I/O in Java
Handling I/O in JavaHandling I/O in Java
Handling I/O in Java
 
Rust system programming language
Rust system programming languageRust system programming language
Rust system programming language
 
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafSpring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
 
OpenSIPS Workshop
OpenSIPS WorkshopOpenSIPS Workshop
OpenSIPS Workshop
 
JavaScript - Chapter 4 - Types and Statements
 JavaScript - Chapter 4 - Types and Statements JavaScript - Chapter 4 - Types and Statements
JavaScript - Chapter 4 - Types and Statements
 
Authorization and Authentication in Microservice Environments
Authorization and Authentication in Microservice EnvironmentsAuthorization and Authentication in Microservice Environments
Authorization and Authentication in Microservice Environments
 
JavaScript: Variables and Functions
JavaScript: Variables and FunctionsJavaScript: Variables and Functions
JavaScript: Variables and Functions
 
Python-Functions.pptx
Python-Functions.pptxPython-Functions.pptx
Python-Functions.pptx
 

Similaire à Actor Model Concurrency Approach

Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010Christopher Brown
 
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling SoftwareJAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Softwarejazoon13
 
Software design with Domain-driven design
Software design with Domain-driven design Software design with Domain-driven design
Software design with Domain-driven design Allan Mangune
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling SoftwareAbdelmonaim Remani
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remanijaxconf
 
Simulate Functional Models
Simulate Functional ModelsSimulate Functional Models
Simulate Functional ModelsTaylorDuffy11
 
In the age of Big Data, what role for Software Engineers?
In the age of Big Data, what role for Software Engineers?In the age of Big Data, what role for Software Engineers?
In the age of Big Data, what role for Software Engineers?CS, NcState
 
Playtrip: a CQRS/ES architecture in Erlang.
Playtrip: a CQRS/ES architecture in Erlang.Playtrip: a CQRS/ES architecture in Erlang.
Playtrip: a CQRS/ES architecture in Erlang.Nicola Fiorillo
 
Why real integration developers ride Camels
Why real integration developers ride CamelsWhy real integration developers ride Camels
Why real integration developers ride CamelsChristian Posta
 
Building an Experimentation Platform in Clojure
Building an Experimentation Platform in ClojureBuilding an Experimentation Platform in Clojure
Building an Experimentation Platform in ClojureSrihari Sriraman
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applicationsAmit Kejriwal
 
Rethinking system design
Rethinking system designRethinking system design
Rethinking system designBryan Ollendyke
 
Using Metrics for Fun, Developing with the KV Store + Javascript & News from ...
Using Metrics for Fun, Developing with the KV Store + Javascript & News from ...Using Metrics for Fun, Developing with the KV Store + Javascript & News from ...
Using Metrics for Fun, Developing with the KV Store + Javascript & News from ...Harry McLaren
 
JavaOne: Efficiently building and deploying microservices
JavaOne: Efficiently building and deploying microservicesJavaOne: Efficiently building and deploying microservices
JavaOne: Efficiently building and deploying microservicesBart Blommaerts
 
Monitoring-Docker-Container-and-Dockerized-Applications
Monitoring-Docker-Container-and-Dockerized-ApplicationsMonitoring-Docker-Container-and-Dockerized-Applications
Monitoring-Docker-Container-and-Dockerized-ApplicationsSatya Sanjibani Routray
 
Monitoring docker container and dockerized applications
Monitoring docker container and dockerized applicationsMonitoring docker container and dockerized applications
Monitoring docker container and dockerized applicationsAnanth Padmanabhan
 
Monitoring docker-container-and-dockerized-applications
Monitoring docker-container-and-dockerized-applicationsMonitoring docker-container-and-dockerized-applications
Monitoring docker-container-and-dockerized-applicationsSatya Sanjibani Routray
 

Similaire à Actor Model Concurrency Approach (20)

Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010
 
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling SoftwareJAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
 
Software design with Domain-driven design
Software design with Domain-driven design Software design with Domain-driven design
Software design with Domain-driven design
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling Software
 
Scalable game-servers-tgc
Scalable game-servers-tgcScalable game-servers-tgc
Scalable game-servers-tgc
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
 
Simulate Functional Models
Simulate Functional ModelsSimulate Functional Models
Simulate Functional Models
 
Sharing-akka-pub
Sharing-akka-pubSharing-akka-pub
Sharing-akka-pub
 
In the age of Big Data, what role for Software Engineers?
In the age of Big Data, what role for Software Engineers?In the age of Big Data, what role for Software Engineers?
In the age of Big Data, what role for Software Engineers?
 
Playtrip: a CQRS/ES architecture in Erlang.
Playtrip: a CQRS/ES architecture in Erlang.Playtrip: a CQRS/ES architecture in Erlang.
Playtrip: a CQRS/ES architecture in Erlang.
 
Why real integration developers ride Camels
Why real integration developers ride CamelsWhy real integration developers ride Camels
Why real integration developers ride Camels
 
Building an Experimentation Platform in Clojure
Building an Experimentation Platform in ClojureBuilding an Experimentation Platform in Clojure
Building an Experimentation Platform in Clojure
 
Akka.Net Overview
Akka.Net OverviewAkka.Net Overview
Akka.Net Overview
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applications
 
Rethinking system design
Rethinking system designRethinking system design
Rethinking system design
 
Using Metrics for Fun, Developing with the KV Store + Javascript & News from ...
Using Metrics for Fun, Developing with the KV Store + Javascript & News from ...Using Metrics for Fun, Developing with the KV Store + Javascript & News from ...
Using Metrics for Fun, Developing with the KV Store + Javascript & News from ...
 
JavaOne: Efficiently building and deploying microservices
JavaOne: Efficiently building and deploying microservicesJavaOne: Efficiently building and deploying microservices
JavaOne: Efficiently building and deploying microservices
 
Monitoring-Docker-Container-and-Dockerized-Applications
Monitoring-Docker-Container-and-Dockerized-ApplicationsMonitoring-Docker-Container-and-Dockerized-Applications
Monitoring-Docker-Container-and-Dockerized-Applications
 
Monitoring docker container and dockerized applications
Monitoring docker container and dockerized applicationsMonitoring docker container and dockerized applications
Monitoring docker container and dockerized applications
 
Monitoring docker-container-and-dockerized-applications
Monitoring docker-container-and-dockerized-applicationsMonitoring docker-container-and-dockerized-applications
Monitoring docker-container-and-dockerized-applications
 

Dernier

Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewsandhya757531
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfManish Kumar
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESkarthi keyan
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHSneha Padhiar
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solidnamansinghjarodiya
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosVictor Morales
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming languageSmritiSharma901052
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptxmohitesoham12
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Sumanth A
 

Dernier (20)

Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solid
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming language
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptx
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
 

Actor Model Concurrency Approach

  • 1. ACTOR MODEL A DIFFERENT CONCURRENCY APPROACH Emre Akış @akisemre
  • 2. • CONCURRENCY MODELS • HISTORY • CONCEPTS • +‘s & -’s • ECOSYSTEM • RESOURCES
  • 3. • CONCURRENCY MODELS • HISTORY • CONCEPTS • +‘s & -’s • ECOSYSTEM • RESOURCES
  • 4. • Sequential • Concurrent • Parallel • Mixed * http://leakfromjavaheap.blogspot.com.tr/2016/05/concurrency-vs-parallelism.html
  • 5. • CONCURRENCY MODELS • HISTORY • CONCEPTS • +‘s & -’s • ECOSYSTEM • RESOURCES
  • 6. • 1973, Carl Hewitt • 1986, Gul Agha • 1995, Ericsson : First Commercial Use • 2009, Jonas Boner
  • 7. • CONCURRENCY MODELS • HISTORY • CONCEPTS • +‘s & -’s • ECOSYSTEM • RESOURCES
  • 8. • 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.
  • 9. • Encapsulated state • Behaviour • Indepedent control • Mailbox http://brianrepko.github.io/presentation-big-data-bioinfo/images/actor-model.png
  • 10. Address • Identifies an actor • May also represent a proxy/forwarder to an an Actor • Contains location and transport information • Location transparency
  • 11. Address • One actor may represent many actors (pool) • One actor may have many address Load Balancer Actor Actor Actor Actor Machine 1 Machine 2 Actor Actor Actor X Y Z
  • 12. • Each actor has its own process (not intended as an OS process) and they don’t share state between them. • Actors can change their own states. • Actors can create other actors and when they do that they receive back the new actor address. • Actor exchange messages in an asynchronous fashion.
  • 13. Handling Errors • Supervision : The running state of an actor is monitored and managed by another actor (Supervisor) https://petabridge.com/blog/how-actors-recover-from-failure-hierarchy-and-supervision/
  • 14. • Address does not change during restarts • Mailboxes are persisted outside the actor instances http://getakka.net/docs/concepts/actors
  • 15. • CONCURRENCY MODELS • HISTORY • CONCEPTS • +‘s & -’s • ECOSYSTEM • RESOURCES
  • 16. • No shared memory and therefore locking is not required. • Race conditions greatly reduced. • It greatly simplifies the control flow of a program, each actor has its own process (flow of control) • Easy to distribute, across cores, across program boundaries, across machines. • It simplifies error handling code. • It makes it easier to build fault-tolerant systems.
  • 17. • Too many actors ( Tracing ) • Testing • Debugging • Don’t work well when • shared state needed • need to achieve global consensus • synchronous behaviour is needed
  • 18. • CONCURRENCY MODELS • HISTORY • CONCEPTS • +‘s & -’s • ECOSYSTEM • RESOURCES
  • 19. • T https://azure.microsoft.com/en-us/blog/use-actors-to-talk-to-millions/ • F https://www.facebook.com/notes/facebook-engineering/facebook-chat/14218138919/ • W https://www.wired.com/2015/09/whatsapp-serves-900-million-users-50-engineers/ • sas
  • 20.
  • 21.
  • 22. • CONCURRENCY MODELS • HISTORY • CONCEPTS • +‘s & -’s • ECOSYSTEM • RESOURCES
  • 23. • https://en.wikipedia.org/wiki/Actor_model • http://wiki.c2.com/?ActorsModel • Hewitt, Meijer and Szyperski: The Actor Model @ • • •