Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Stateful Apps with OTP
Search
Maciej Kaszubowski
April 20, 2017
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Stateful Apps with OTP
Maciej Kaszubowski
April 20, 2017
More Decks by Maciej Kaszubowski
See All by Maciej Kaszubowski
Error-free Elixir
mkaszubowski
0
470
Modular Design in Elixir (ElixirConf EU 2019)
mkaszubowski
2
940
The Big Ball of Nouns
mkaszubowski
0
160
Modular Design in Elixir
mkaszubowski
1
420
Our three years with Elixir
mkaszubowski
0
310
Concurrency Basics for Elixir
mkaszubowski
0
170
Distributed Elixir
mkaszubowski
0
220
Software Architecture
mkaszubowski
0
170
Let it crash - fault tolerance in Elixir/OTP
mkaszubowski
0
550
Other Decks in Programming
See All in Programming
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
390
A2UI for Android: Safely Rendering AI-Generated UI with Jetpack Compose - DroidKaigi 2026
itsmedreamwalker
0
130
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
120
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
160
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
350
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
110
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
2
2.2k
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
270
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.4k
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.7k
自分的「カンファレンスの楽しみ方」
syumai
0
200
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
240
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
540
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
How to Ace a Technical Interview
jacobian
281
24k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
We Have a Design System, Now What?
morganepeng
55
8.3k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
4 Signs Your Business is Dying
shpigford
187
23k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Claude Code のすすめ
schroneko
67
230k
A designer walks into a library…
pauljervisheath
211
25k
Transcript
Stateful Apps with OTP Maciej Kaszubowski
Realtime Apps with OTP Maciej Kaszubowski
Background
Http Server Client
Architecture Server Mobile Mobile Kurento Mobile Websocket Websocket & REST
WebRTC
Challenges
Async communication with Kurento
Async communication with Clients
Handling Concurrent Calls
Deploys, migrations & Restarts
A lot can go wrong
A lot can go wrong & Errors are dangerous
How to deal with this?
init callback
init callback
init callback
init callback
init callback
init callback
Dealing with failures
RoomServer
RoomServer
Let it FAIL
Room Supervisor RoomServer
Room Supervisor RoomServer
Room Supervisor RoomServer
After the restart, the state is gone
Room Supervisor BackupServer RoomServer
None
Room Supervisor BackupServer RoomServer
None
None
Multiple calls
Room Supervisor BackupServer RoomServer
Common Room Supervisor Room Supervisor Backup Server Room Server Room
Supervisor Backup Server Room Server
Common Room Supervisor Room Supervisor Backup Server Room Server Room
Supervisor Backup Server Room Server
Common Room Supervisor Room Supervisor Backup Server Room Server Room
Supervisor Backup Server Room Server
Common Room Supervisor Room Supervisor Backup Server Room Server
PubSub
Status Updates Server Mobile Join Mobile Room status
MyApp.Endpoint.broadcast( “room_id”, “update_status”, status )
apps/ | |—— domain/ |—— web/
Status Updates Server Mobile Mobile Subscribe Subscribe
Status Updates Server Mobile Mobile Join
Status Updates Server Mobile Mobile Status update Status update
Status Updates
Status Updates
Status Updates
Status Updates
Status Updates
Status Updates
History
History Server Call History Subscribe Status update
History
History
History
Conclusions
Simpler system
Testing is easy
Changes are easy
Great performance
We should learn from the Erlang community
A lot of fun!
Thanks!