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
Celluloid & DCell
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Patrick Van Stee
July 11, 2012
Programming
4
590
Celluloid & DCell
Patrick Van Stee
July 11, 2012
Tweet
Share
More Decks by Patrick Van Stee
See All by Patrick Van Stee
Raft: Consensus for Rubyists
vanstee
141
7.3k
Elixir and Ecto
vanstee
5
980
Bootstrap
vanstee
8
820
HTTP API Design for iOS Applications
vanstee
11
680
Consensus: An Introduction to Raft
vanstee
21
3.1k
Convergent Replicated Data Types
vanstee
4
840
Pour Over Brewing Method
vanstee
1
390
Map Reduce & Ruby
vanstee
10
870
Other Decks in Programming
See All in Programming
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
150
2026/02/04 AIキャラクター人格の実装論 口 調の模倣から、コンテキスト制御による 『思想』と『行動』の創発へ
sr2mg4
0
570
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
340
今から始めるClaude Code超入門
448jp
8
9.4k
文字コードの話
qnighy
36
14k
ご飯食べながらエージェントが開発できる。そう、Agentic Engineeringならね。
yokomachi
1
250
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.5k
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
CSC307 Lecture 06
javiergs
PRO
0
700
CSC307 Lecture 07
javiergs
PRO
1
560
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
120
AIプロダクト時代のQAエンジニアに求められること
imtnd
1
450
Featured
See All Featured
Building Adaptive Systems
keathley
44
2.9k
Skip the Path - Find Your Career Trail
mkilby
0
66
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
140
Site-Speed That Sticks
csswizardry
13
1.1k
From π to Pie charts
rasagy
0
140
The Curse of the Amulet
leimatthew05
1
9.1k
sira's awesome portfolio website redesign presentation
elsirapls
0
160
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
200
Transcript
Celluloid DCell &
@vanstee github.com/vanstee Patrick Van Stee highgroove.com
@tarcieri Revactor Reia nio4r Cryptosphere cool.io
brew install zeromq gem install dcell Setup
Celluloid General purpose concurrency framework for Ruby built on the
Actor Model
class Counter attr_reader :count def initialize @count = 0 end
def increment @count += 1 end end
class Counter attr_reader :count def initialize @count = 0 @mutex
= Mutex.new end def increment @mutex.synchronize do @count += 1 end end end
Threads are hard!
class Counter include Celluloid attr_reader :count def initialize @count =
0 end def increment @count += 1 end end
Actor Model
•No shared state •Communicate with messages •Process messages sequentially
class Counter include Celluloid def increment(count, actor) return count if
count < 10000 actor.increment( count + 1, Actor.current ) end end
& Asynchronous Method Calls Futures
counter = Counter.new # returns immediately counter.increment! puts counter.count #
returns immediately future = counter.future :increment puts future.value
module Enumerable def map(&block) futures = map do |item| Celluloid::Future.new(
item, &block ) end futures.map(&:value) end end
Caveats
• The GIL in MRI does not allow parallelism •
Threads and Fibers are expensive • Concurrency is still a hard problem [not really]
DCell
Celluloid General purpose concurrency framework for Ruby built on the
Actor Model DCell Distributed Celluloid over 0MQ
“I thought of objects being like biological cells or individual
computers on a network, only able to communicate with messages. Alan Kay
• Exposes Actors on the Network • Send messages as
you normally would
DRb DCell Threads Actors
Demo
Also Checkout Sidekiq
github.com celluloid/celluloid celluloid/dcell
Hack Night