$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Failing Gracefully with the Actor Model
Search
Roger Johansson
May 03, 2017
Programming
0
70
Failing Gracefully with the Actor Model
Patterns for resiliency using the Actor Model
Roger Johansson
May 03, 2017
Tweet
Share
More Decks by Roger Johansson
See All by Roger Johansson
Composing Software - Avoiding the distributed monolith
rogeralsing
1
130
Proto.Actor
rogeralsing
0
350
Why Docker at Betsson Tech
rogeralsing
0
66
Introduction to Consul
rogeralsing
0
100
Scaling Betsson Tech
rogeralsing
0
98
Scale up and out with Akka.NET
rogeralsing
0
100
Other Decks in Programming
See All in Programming
CSC305 Lecture 17
javiergs
PRO
0
340
AWS CDKの推しポイントN選
akihisaikeda
1
240
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
120
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
7
1k
認証・認可の基本を学ぼう前編
kouyuume
0
190
AIコーディングエージェント(Gemini)
kondai24
0
200
DSPy Meetup Tokyo #1 - はじめてのDSPy
masahiro_nishimi
1
160
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
360
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
1
210
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
300
How Software Deployment tools have changed in the past 20 years
geshan
0
29k
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
200
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
KATA
mclloyd
PRO
32
15k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Context Engineering - Making Every Token Count
addyosmani
9
490
Automating Front-end Workflow
addyosmani
1371
200k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
390
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Unsuck your backbone
ammeep
671
58k
Become a Pro
speakerdeck
PRO
31
5.7k
Transcript
Roger Johansson Akka.NET and Proto.Actor Founder Solution Architect - Betsson
Group Twitter: @rogeralsing Github: rogeralsing Mail:
[email protected]
Github.com/rogeralsing/presentations http://Proto.Actor
Dealing with, mitigating and preventing failures. In the small, and
at scale.
An escalator can never break: it can only become stairs.
You should never see an Escalator Temporarily Out Of Order sign, just Escalator Temporarily Stairs. Sorry for the convenience. -Mitch Hedberg
None
None
Three axioms: Send – an actor can send messages to
other actors Create – an actor can create new actors Become – an actor can decide how to handle it’s next message
”An island of consistency in a sea of concurrency” ”Shared
nothing”, ”Black box” ”Location transparent”, ”Distributable by design”
Implementations: BEAM – Erlang, Elixir, LFE JVM – Akka, Orbit
.NET – Akka.NET, Proto.Actor, Microsoft Orleans Go – Proto.Actor
Event-driven thread PID Actor State Supervision Children Mailbox Behavior Transport
/c2 /b2 /b1 /a1 /a2 /b3 /c3 /c4 /c5 /
/c1 /b1
Component Consumer 2 Consumer 1
Data Access Website Businesslogic
Vendor machine Insert coins Gets coffee Me Need more coins
Vendor machine Insert coins Out of beans Service guy Refill
beans Gets coffee Me
Service Request Application error Supervisor Manage failures Response Validation error
Client
/c2 /b2 /b1 /a1 /a2 /b3 /c3 /c4 /c5 /
/c1 OneForOne supervisor AllForOne supervisor /b1 /b3
child parent Protect state by delegating work Performs work, can
be restarted
None
child parent Attempts Delay
DB Actor DB Query DB Result DB Up DB Query
DB Error DB Down
Idle Active Gated Quarantined
Node 2 Node 1 Primary Queue Secondary
Queue Hash Slot 1 Hash Slot 2 Hash Slot 3
? ? ? ? Router Worker 1 Worker 2 Worker
3 Fan out Consumer
! ! ! ! Router Worker 1 Worker 2 Worker
3 Return first reply Consumer
! ! ! ! Router Worker 2 Worker 3 Require
same reply from at least N workers Consumer Worker 1
None
Add a delay after each message
Limit messages per time slice
Actor Mailbox
Actor Mailbox
1 2 1 2 3 3 4 4 Router Worker
1 Worker 2 Worker 3 Limit concurrent access to a resource
Worker 1 Producer Work to be done Send work Worker
2 Work to be done Send work Work Done Work Done
Always Exists, Never Fails
None
None
Node A 433 Node B 24345 Node C 82327 Hash:
989123 Node E 943772 Grain Id: Roger Names: Roger Actors: Roger : User
Node A 433 Node B 24345 Node C 82327 Hash:
989123 Node E 943772 Node F 987234 Grain Id: Roger Names: Roger Actors: Roger : User
Coordinator
The End Roger Johansson Twitter: @rogeralsing Github: rogeralsing Mail:
[email protected]
Github.com/rogeralsing/presentations http://Proto.Actor