Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
68
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
340
Why Docker at Betsson Tech
rogeralsing
0
64
Introduction to Consul
rogeralsing
0
100
Scaling Betsson Tech
rogeralsing
0
84
Scale up and out with Akka.NET
rogeralsing
0
100
Other Decks in Programming
See All in Programming
生成AI時代のコンポーネントライブラリの作り方
touyou
1
290
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
260
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
2
12k
ご注文の差分はこちらですか? 〜 AWS CDK のいろいろな差分検出と安全なデプロイ
konokenj
3
580
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
680
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
1.1k
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
360
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
140
フロントエンドのパフォーマンスチューニング
koukimiura
5
2k
Porting a visionOS App to Android XR
akkeylab
0
680
#QiitaBash MCPのセキュリティ
ryosukedtomita
1
1.5k
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
270
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
750
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
A Tale of Four Properties
chriscoyier
160
23k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Building Applications with DynamoDB
mza
95
6.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
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