Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Actor Model in Ruby
Search
Celso Crivelaro
September 23, 2016
Technology
0
250
Actor Model in Ruby
Talk in RubyConf Brazil 2016
Celso Crivelaro
September 23, 2016
Tweet
Share
More Decks by Celso Crivelaro
See All by Celso Crivelaro
Sistemas de Recomendação
celsocrivelaro
2
230
Big Data para Gerentes de Projetos
celsocrivelaro
0
64
FileSystems em Ruby com FUSE
celsocrivelaro
2
68
Padrões e Boas Práticas de Teste de Tela
celsocrivelaro
0
420
Projeto de APIs
celsocrivelaro
0
160
Testing Network Conditions with ToxiProxy
celsocrivelaro
1
390
Testing Network Conditions with ToxiProxy
celsocrivelaro
0
83
Separando as regras de negócios do Rails
celsocrivelaro
0
180
InfluxDB + Grafana
celsocrivelaro
0
260
Other Decks in Technology
See All in Technology
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
300
Amazon Quick Suite で始める手軽な AI エージェント
shimy
1
1k
AI時代の新規LLMプロダクト開発: Findy Insightsを3ヶ月で立ち上げた舞台裏と振り返り
dakuon
0
300
AI-DLCを現場にインストールしてみた:プロトタイプ開発で分かったこと・やめたこと
recruitengineers
PRO
2
190
Amazon Bedrock Knowledge Bases × メタデータ活用で実現する検証可能な RAG 設計
tomoaki25
6
1.4k
Fashion×AI「似合う」を届けるためのWEARのAI戦略
zozotech
PRO
2
1k
Jakarta Agentic AI Specification - Status and Future
reza_rahman
0
110
SQLだけでマイグレーションしたい!
makki_d
0
1.1k
MLflowダイエット大作戦
lycorptech_jp
PRO
1
150
生成AI時代におけるグローバル戦略思考
taka_aki
0
210
Lookerで実現するセキュアな外部データ提供
zozotech
PRO
0
180
AIエージェント開発と活用を加速するワークフロー自動生成への挑戦
shibuiwilliam
4
590
Featured
See All Featured
Visualization
eitanlees
150
16k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Ruling the World: When Life Gets Gamed
codingconduct
0
92
The Mindset for Success: Future Career Progression
greggifford
PRO
0
180
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
110
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
220
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
32
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
200
Designing Powerful Visuals for Engaging Learning
tmiket
0
180
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
120
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Transcript
Actor Model in Ruby Celso Crivelaro @celsocrivelaro http://crivelaro.me 1
DEVELOPER @ PROFESSOR @
None
My problem
Authorization APIs SMTP Protocol Strange Protocol Strange Lib 5
Strange Protocol / Strange Lib => Unmaintained Bad documentation Troubleshooting
was impossible
Authorization APIs TCP/IP Custom Protocol SMTP Protocol
High Concurrency ~ 1000 connections Fault Tolerant Easy TCP Server
API
None
Actors Reactor 10
Actor Model Theory
Actor 1 Mailbox Actor 2 Mailbox Actor 3 Mailbox
Actors are similar to Objects
Send messages to each other Asynchronous Actors Objects Synchronous Create
new ones Isolated Share memory Keep state
Actors can be distributed 15
Actor 1 Mailbox Actor 2 Mailbox Actor 3 Mailbox
Fault Tolerant
Let it crash philosophy
Actor 1 Mailbox Actor 2 Mailbox Actor 3 Mailbox Actor
4 Mailbox A4 is linked to A2 A2 is warned when A4 crashes A2 takes an action (restart A4) Avoid defensive programming
Who implements Actors 20
Pykka
None
Celluloid Actors Ruby Objects Same structure from classes Runs over
threads / fibers Futures and Pools Sync / Async Methods
None
25
When Actor crashes…
None
What if another actor could do something?
Supervisors
30
None
Even if an Actor just terminates
None
Actor Supervisor Restart Actor Warn other Supervisor Callbacks Avoid begin…
rescue... / if Actions:
Must be finished to be CG’ed 35
None
Futures
None
Pool
Res 1 Res 2 Res 3 Pool Res 1 40
None
http://www.mikeperham.com/2015/10/14/should-you-use-celluloid/
None
Actors Reactor
Reactor Pattern 45
Handler 1 Handler 2 Dispatcher Handler 3 Handles service request
Delivered concurrently to handlers Demultiplexing Event Event Event
https://github.com/celluloid/nio4r
None
None
Server Celluloid:IO Supervisor 50
None
None
Important
Mutant Data Structure
Actor 1 Mailbox Actor 2 Mailbox Actor 3 Mailbox Microservices
55
Evaluate the best concurrency model Celluloid Documentation
References
http://www.brianstorti.com/the-actor-model/
None
https://www.sitepoint.com/an-introduction-to-celluloid-part-i/
https://github.com/celluloid/celluloid-io
http://queroserdevlocaweb.com.br/
Thank you! @celsocrivelaro Slides at http://crivelaro.me