unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [ANN] kgio library / RubyGem
@ 2010-09-28  3:03 Eric Wong
  2010-11-15 18:41 ` Eric Wong
  2010-12-22 11:24 ` Iñaki Baz Castillo
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Wong @ 2010-09-28  3:03 UTC (permalink / raw)
  To: mongrel-unicorn-GrnCvJ7WPxnNLxjTenLetw,

Hello all,

I've released kgio, a kinder, gentler I/O library for Ruby.  Some of its
features are useful for Unicorn, and all of it is useful for Rainbows!

I intend to make kgio a requirement for both Unicorn and
Rainbows!/Zbatery.  I'm comfortable with the code, but extra testers and
extra eyes to review it would be helpful (it's nearly all C).

There were several factors leading the creation of this library:

  1. The performance loss from Ruby 1.9.2 due to extending exceptions
     with IO::Wait{Read,Writ}able is annoying.  While it's partly
     fixed[1] and fixable[2] for 1.9.3, it could be a while before
     1.9.3 is available.  Unicorn currently does non-blocking accept
     very aggressively.

  2. (Rainbows! only) Slicing partially written strings for
     non-blocking I/O in gets painful with Ruby 1.9, it's much easier
     (at least for me) to do this in C and kgio_trywrite allows
     exactly that, returning the unwritten portion of a string.

  3. (Rainbows! only) It offers hooks for using alternative
     methods to switch execution contexts (experience taken from
     building the FiberSpawn/FiberPool modules).

  4. (philosophical) I've never considered EAGAIN/EINPROGRESS
     "exceptional" conditions when explicitly doing non-blocking
     I/O, and thus unworthy of raising exceptions.

kgio currently passes all tests on on Linux 2.6 (1.9.{1,2},
1.8.{6,7}, rbx 1.1) and FreeBSD 7.0 (1.8.7).


[1] - http://thread.gmane.org/gmane.comp.lang.ruby.core/30854
[2] - http://thread.gmane.org/gmane.comp.lang.ruby.core/31801

Eric Wong
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
Do not quote signatures (like this one) or top post when replying

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-05  7:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-28  3:03 [ANN] kgio library / RubyGem Eric Wong
2010-11-15 18:41 ` Eric Wong
2010-12-22 11:24 ` Iñaki Baz Castillo
2010-12-22 20:27   ` Eric Wong

Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).