Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
220
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
82
Separando as regras de negócios do Rails
celsocrivelaro
0
180
InfluxDB + Grafana
celsocrivelaro
0
260
Other Decks in Technology
See All in Technology
寫了幾年 Code,然後呢?軟體工程師必須重新認識的 DevOps
cheng_wei_chen
1
1k
[デモです] NotebookLM で作ったスライドの例
kongmingstrap
0
100
AI時代の開発フローとともに気を付けたいこと
kkamegawa
0
2.3k
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
670
生成AIでテスト設計はどこまでできる? 「テスト粒度」を操るテーラリング術
shota_kusaba
0
540
非CUDAの悲哀 〜Claude Code と挑んだ image to 3D “Hunyuan3D”を EVO-X2(Ryzen AI Max+395)で動作させるチャレンジ〜
hawkymisc
1
160
AWS re:Invent 2025で見たGrafana最新機能の紹介
hamadakoji
0
130
pmconf2025 - 他社事例を"自社仕様化"する技術_iRAFT法
daichi_yamashita
0
790
Kiro Autonomous AgentとKiro Powers の紹介 / kiro-autonomous-agent-and-powers
tomoki10
0
320
Overture Maps Foundationの3年を振り返る
moritoru
0
160
モバイルゲーム開発におけるエージェント技術活用への試行錯誤 ~開発効率化へのアプローチの紹介と未来に向けた展望~
qualiarts
0
660
因果AIへの招待
sshimizu2006
0
930
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
The World Runs on Bad Software
bkeepers
PRO
72
12k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.7k
Git: the NoSQL Database
bkeepers
PRO
432
66k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.8k
Being A Developer After 40
akosma
91
590k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
The Cult of Friendly URLs
andyhume
79
6.7k
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