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
130
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
490
Modular Design in Elixir (ElixirConf EU 2019)
mkaszubowski
2
960
The Big Ball of Nouns
mkaszubowski
0
170
Modular Design in Elixir
mkaszubowski
1
430
Our three years with Elixir
mkaszubowski
0
320
Concurrency Basics for Elixir
mkaszubowski
0
180
Distributed Elixir
mkaszubowski
0
230
Software Architecture
mkaszubowski
0
180
Let it crash - fault tolerance in Elixir/OTP
mkaszubowski
0
570
Other Decks in Programming
See All in Programming
SODA - FACT BOOK(JP)
sodainc
1
40k
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.8k
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
140
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
370
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.5k
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
230
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
370
AmebaブログはKMPから卒業します
kmars0605
0
340
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
Modernizing iOS Apps
seyfoyun
0
150
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.8k
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
740
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
6.4k
エンジニアに許された特別な時間の終わり
watany
109
250k
Being A Developer After 40
akosma
PRO
92
590k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
680
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Google's AI Overviews - The New Search
badams
0
1.7k
Mind Mapping
helmedeiros
1
430
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
480
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
510
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!