Skip to content
This repository has been archived by the owner. It is now read-only.
UNMAINTAINED: See celluloid/celluloid#779 - Actor-based distributed objects in Ruby based on Celluloid and 0MQ
Ruby HTML Other
Branch: master
Clone or download
Latest commit a8fecfa Aug 21, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks benchmarks: align with current DCell API May 20, 2015
examples example: rename registry.rb to options.rb May 20, 2015
explorer Revert "info service: use facter to collect system info" Jul 26, 2015
lib Revert "info service: use facter to collect system info" Jul 26, 2015
spec spec:node: increase wait time to please jruby May 3, 2015
tasks always use .rb extensions for rake tasks Apr 19, 2015
travis travis: install libzmq3 with libsodium support May 20, 2015
.coveralls.yml Coveralls support Mar 19, 2013
.gitignore Coveralls support Mar 19, 2013
.rspec spec: add --tty option to have colors with jruby Apr 28, 2015
.rubocop.yml Remove 'culture' module Aug 21, 2018
.travis.yml Update Travis config Feb 14, 2016
Gemfile gems: bind dependencies to proper versions Apr 28, 2015
LICENSE.txt 2012 Mar 11, 2012 Add "maintained: no! (as of 2015)" badge Aug 21, 2018
Rakefile always use .rb extensions for rake tasks Apr 19, 2015
dcell.gemspec Revert "info service: use facter to collect system info" Jul 26, 2015
logo.png Simplified logo Mar 6, 2012


Gem Version MIT licensed Build Status Maintained: no

"Objects can message objects transparently that live on other machines over the network, and you don't have to worry about the networking gunk, and you don't have to worry about finding them, and you don't have to worry about anything. It's just as if you messaged an object that's right next door." --Steve Jobs describing the NeXT Portable Distributed Object system

DCell is a simple and easy way to build distributed applications in Ruby. Somewhat similar to DRb, DCell lets you easily expose Ruby objects as network services, and call them remotely just like you would any other Ruby object. However, unlike DRb all objects in the system are concurrent. You can create and register several available services on a given node, obtain handles to them, and easily pass these handles around the network just like any other objects.

DCell is a distributed extension to Celluloid, which provides concurrent objects for Ruby with many of the features of Erlang, such as the ability to supervise objects and restart them when they crash, and also link to other objects and receive event notifications of when they crash. This makes it easier to build robust, fault-tolerant distributed systems.

DCell uses the 0MQ messaging protocol which provides a robust, fault-tolerant brokerless transport for asynchronous messages sent between nodes. DCell is built on top of the Celluloid::ZMQ library, which provides a Celluloid-oriented wrapper around the underlying ffi-rzmq library.

Please see the DCell Wiki for more detailed documentation and usage notes.

Like DCell? Join the Celluloid Google Group

Is it any good?


Is It "Production Ready™"?

Not entirely, but eager early adopters are welcome!


Add this line to your application's Gemfile:

gem 'dcell'

And then execute:

$ bundle

Or install it yourself as:

$ gem install dcell

Inside of your Ruby program do:

require 'dcell' pull it in as a dependency.


Copy and paste this into itchy.rb (or run bundle exec examples/itchy.rb):

require 'dcell'

DCell.start :id => "itchy", :addr => "tcp://"

class Itchy
  include Celluloid

  def initialize
    puts "Ready for mayhem!"
    @n = 0

  def fight
    @n = (@n % 6) + 1
    if @n <= 3
      puts "Bite!"
      puts "Fight!"

Itchy.supervise_as :itchy

You can now launch itchy with:

ruby itchy.rb

Now copy and paste the following into scratchy.rb (also in examples)

require 'dcell'

DCell.start :id => "scratchy", :addr => "tcp://"
itchy_node = DCell::Node["itchy"]

puts "Fighting itchy! (check itchy's output)"

6.times do
  sleep 1

Now run scratchy side-by-side with itchy. You should see this on itchy:

$ bundle exec examples/itchy.rb
Ready for mayhem!
I, [2012-12-25T22:52:45.362355 #74272]  INFO -- : Connected to scratchy

This is a basic example how individual DCell::Nodes have registered Celluloid actors which can be accessed remotely by other DCell::Nodes.

Supported Ruby Versions

This library supports and is tested against the following Ruby versions:

  • Ruby (MRI) 2.0, 2.1, 2.2, 2.3
  • JRuby 1.7, 9000


  • Fork this repository on GitHub
  • Make your changes and send us a pull request
  • If we like them we'll merge them
  • If we've accepted a patch, feel free to ask for commit access


Copyright (c) 2012-2016 Tony Arcieri. Distributed under the MIT License. See LICENSE.txt for further details.

You can’t perform that action at this time.