BT

Article: Using Ruby Fibers for Async I/O: NeverBlock and Revactor

by Werner Schuster on Sep 03, 2008 |
In this article, we interview the maintainers of two projects that use Ruby 1.9's Fibers to make non-blocking I/O easy to use.

After Rails is finally on track to be threadsafe, the use of non-blocking I/O is necessary to make the most of running multiple Rails requests in one Ruby instance. The problem: some of the current database adapters block during the runtime of a database request. By using the non-blocking versions of the database drivers and using Fibers to make the process as transparent as possible, the Neverblock library allows to keep the Rails runtime busy. Starting out with a PostgreSQL driver, MySQL support is now available. We talked to Mohammad A. Ali from the Neverblock project.

A more longterm solution for scalability is the use of Erlang-style Actors. Revactor aims to provide Actors on Ruby 1.9 using Fibers. We talked to Tony Arcieri, the creator of the project.

Read the interviews in the article "Using Ruby Fibers for Async I/O: NeverBlock and Revactor".

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

typo by Leonid Maslov

proivde => provide

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT