Skip to content
This repository has been archived by the owner. It is now read-only.
UNMAINTAINED: See celluloid/celluloid#779 - Evented sockets for Celluloid actors
Branch: master
Clone or download
Latest commit 49c1021 Aug 21, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks change name of benchmarking actor and mark for refactoring Sep 22, 2015
lib/celluloid Bump version to 0.17.3 and update Jan 18, 2016
log Get in sync with Celluloid 0.13 Dec 12, 2012
spec Minor formatting changes to new socket code. Jan 5, 2016
tasks Benchmarks Mar 29, 2012
.coveralls.yml Coveralls support Mar 14, 2013
.gitignore Initial structure and code import from Celluloid Dec 29, 2011
.rspec Update .rspec May 5, 2014
.rubocop.yml Remove 'culture' module Aug 21, 2018
.travis.yml Test against Ruby 2.3.0 on Travis CI Dec 30, 2015 Bump version to 0.17.3 and update Jan 18, 2016
Gemfile Remove 'culture' module Aug 21, 2018
Guardfile rubocop pass for celluloid/culture#33 Sep 28, 2015
LICENSE.txt 2012 Mar 11, 2012 Add "maintained: no! (as of 2016)" badge Aug 21, 2018
Rakefile rubocop pass for celluloid/culture#33 Sep 28, 2015
celluloid-io.gemspec Remove 'culture' module Aug 21, 2018
logo.png Better align colons Apr 4, 2012


Gem Version MIT licensed Build Status Maintained: no

You don't have to choose between threaded and evented IO! Celluloid::IO provides an event-driven IO system for building fast, scalable network applications that integrates directly with the Celluloid actor library, making it easy to combine both threaded and evented concepts. Celluloid::IO is ideal for servers which handle large numbers of mostly-idle connections, such as Websocket servers or chat/messaging systems.

Celluloid::IO provides a different class of actor: one that's slightly slower and heavier than standard Celluloid actors, but one which contains a high-performance reactor just like EventMachine or This means Celluloid::IO actors have the power of both Celluloid actors and evented I/O loops. Unlike certain other evented I/O systems which limit you to a single event loop per process, Celluloid::IO lets you make as many actors as you want, system resources permitting.

Rather than callbacks, Celluloid::IO exposes a synchronous API built on duck types of Ruby's own IO classes, such as TCPServer and TCPSocket. These classes work identically to their core Ruby counterparts, but in the scope of Celluloid::IO actors provide "evented" performance. Since they're drop-in replacements for the standard classes, there's no need to rewrite every library just to take advantage of Celluloid::IO's event loop and you can freely switch between evented and blocking IO even over the lifetime of a single connection.

Celluloid::IO uses the nio4r gem to monitor IO objects, which provides cross-platform and cross-Ruby implementation access to high-performance system calls such as epoll and kqueue.

Like Celluloid::IO? Join the Celluloid Google Group


Please see the Celluloid::IO Wiki for more detailed documentation and usage notes.

YARD documentation is also available


Add this line to your application's Gemfile:

gem 'celluloid-io'

And then execute:

$ bundle

Or install it yourself as:

$ gem install celluloid-io

Inside of your Ruby program, require Celluloid::IO with:

require 'celluloid/io'

Supported Platforms

Celluloid::IO works on all Ruby (MRI) versions between 1.9.3 & 2.3.1, JRuby's 1.6.*, 1.7.* and 9.* series, and Rubinius' 2.* and 3.* series.

JRuby or Rubinius are the preferred platforms as they support true thread-level parallelism when executing Ruby code, whereas MRI/YARV is constrained by a global interpreter lock (GIL) and can only execute one thread at a time.

Celluloid::IO requires Ruby 1.9 mode on all interpreters, at minimum.

Contributing to Celluloid::IO

  • Fork this repository on github
  • Make your changes and send me a pull request
  • If I like them I'll merge them
  • If I've accepted a patch, feel free to ask for a commit bit!


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

Contains code originally from the RubySpec project also under the MIT License. Copyright (c) 2008 Engine Yard, Inc. All rights reserved.

Contains code originally from the 'OpenSSL for Ruby 2' project released under the Ruby license. Copyright (C) 2001 GOTOU YUUZOU. All rights reserved.

You can’t perform that action at this time.