# Io-reactor 1.0.4

**URL:** <https://www.ruby-forum.com/t/io-reactor-1-0-4/146335>\
**Category:** Ruby\
**Created:** [August 20, 2008, 2:42am UTC](https://www.ruby-forum.com/t/io-reactor-1-0-4/146335 "2008-08-20T02:42:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 20, 2008, 2:42am UTC](https://www.ruby-forum.com/t/io-reactor-1-0-4/146335/1 "2008-08-20T02:42:11Z")

</div>

Version 1.0.4 of IO-Reactor has been released.

IO-Reactor is a pure-Ruby implementation of an asynchronous multiplexed  
IO  
Reactor which is based on the Reactor design pattern found in  
_Pattern-Oriented  
Software Architecture, Volume 2: Patterns for Concurrent and Networked  
Objects_.  
It allows a single thread to demultiplex and dispatch events from one or  
more IO  
objects to the appropriate handler.

== Project Page

[dev(E)iate](http://deveiate.org/projects/IO-Reactor/)

== Installation

Via gems:

$ sudo gem install io-reactor

or from source:

$ wget [http://deveiate.org/code/io-reactor-1.0.4.tar.gz](http://deveiate.org/code/io-reactor-1.0.4.tar.gz)  
$ tar -xzvf io-reactor-1.0.4.tar.gz  
$ cd io-reactor-1.0.4  
$ sudo rake install

== Changes

- Fixed bug when unregistering an IO from its error-handler  
([dev(E)iate](http://deveiate.org/projects/IO-Reactor/ticket/3)). Thanks to  
epirogov at  
tucows{dot}com for reporting this.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 20, 2008, 3:22am UTC](https://www.ruby-forum.com/t/io-reactor-1-0-4/146335/2 "2008-08-20T03:22:33Z")

</div>

On Tue, Aug 19, 2008 at 6:37 PM, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Version 1.0.4 of IO-Reactor has been released.
> 
> IO-Reactor is a pure-Ruby implementation of an asynchronous multiplexed IO  
> Reactor

Just curious, what motivated you to write this? I can’t imagine it  
performs  
very well (is it using IO.select?) and there are already two C-based  
Reactor  
libraries available for Ruby that I know of: EventMachine and Rev.

EventMachine also has pure Ruby and JRuby versions available.

And as an aside: I’m the author of Rev.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 20, 2008, 7:47am UTC](https://www.ruby-forum.com/t/io-reactor-1-0-4/146335/3 "2008-08-20T07:47:28Z")

</div>

Tony A. wrote:

> > Version 1.0.4 of IO-Reactor has been released.
> > 
> > IO-Reactor is a pure-Ruby implementation of an asynchronous  
> > multiplexed IO Reactor
> 
> Just curious, what motivated you to write this?

I needed a way to multiplex the IO from many sockets, and found the  
Reactor pattern much more usable than doing the usual hoop-jumping  
associated with using select().

> I can’t imagine it performs very well (is it using IO.select?) […]

If in your imagination IO.select never performs adequately to the task  
at hand, then I guess it can’t, as it does indeed use IO.select. I have  
not found your imagined performance problems to be true in reality for  
my applications, however.

> […] and there are already two C-based Reactor libraries available  
> for Ruby that I know of: EventMachine and Rev.

While there are _now_ (at least) two C-based “Reactor” libraries, there  
was nothing of the kind at least on the RAA when I wrote the first  
version (back when it was Ruby-Poll).

I certainly had no intention of impugning your hard work (or Francis’s)  
by releasing a bugfix for a library I wrote that does a similar thing a  
different way. I just have other code that depends on IO-Reactor, and  
wanted to (belatedly) apply patches that other people were kind enough  
to send me in case other people do too.

> EventMachine also has pure Ruby and JRuby versions available.

Good to know; I’ll keep it in mind should I ever feel like IO-Reactor  
isn’t addressing my needs anymore.

> And as an aside: I’m the author of Rev.

Okay. Rev’s API looks very clean and pleasantly Rubyish in its idiom. I  
look forward to using it for something.

I was very interested in libevent when I first heard of it, but after  
hearing about the struggles Zed S. had with his Ruby/Event library, I  
guess I dismissed it as a possibility for doing event-based IO in a Ruby  
program with multiple threads. I’ll be interested to see how you have  
solved that problem when I have time to study Rev’s source a little more  
and do some experimentation.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 20, 2008, 8:30am UTC](https://www.ruby-forum.com/t/io-reactor-1-0-4/146335/4 "2008-08-20T08:30:52Z")

</div>

On Aug 19, 9:18 pm, “Tony A.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Tue, Aug 19, 2008 at 6:37 PM, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Version 1.0.4 of IO-Reactor has been released.
> 
> > IO-Reactor is a pure-Ruby implementation of an asynchronous multiplexed IO  
> > Reactor
> 
> Just curious, what motivated you to write this? I can’t imagine it performs  
> very well (is it using IO.select?) and there are already two C-based Reactor  
> libraries available for Ruby that I know of: EventMachine and Rev.

Michael’s lib has been around for much longer than these others. I  
even distributed it with Facets for a while. I’m happy to see it has  
it’s own solid project now.

T.
