Fork me on GitHub
Cool event driven programming for Ruby

Sorry folks, Cool.io is retired.
Please check out Celluloid::IO instead.

Do you like Sinatra? Do you like Node.js? Wish you could write Node.js apps in Ruby as easily as you write Sinatra apps? Let's ask Cool.io how.

Cool.io lives on Github

A Quick Tour

Hi, I'm Coolio, the fabulously wealthy lyricist and rapper behind Gangsta's Paradise. Let's write an event-driven echo server:


See? Look at that, it's easy! But how's it work? Let's take a peek into the parts of my DSL:


Okay, now you understand the basics of writing servers. But how do we write clients? Let's write a client for our echo server:


Get it? Writing clients is a lot like writing servers. There's just a few differences:


Cool.io in Rainbows!

Need to write yo' self a web app that includes Cool.io coolness? Check out how to use Cool.io in Rainbows!, an asynchronous web server:


That's all it takes to get your Cool.io code running alongside a Rack application. Aight, now write yourself some event driven code in Ruby!