unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
To: mongrel-unicorn-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org,
Subject: [ANN] kgio library / RubyGem
Date: Mon, 27 Sep 2010 20:03:02 -0700	[thread overview]
Message-ID: <20100928030302.GA3452@dcvr.yhbt.net> (raw)

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

             reply	other threads:[~2014-05-05  7:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-28  3:03 Eric Wong [this message]
2010-11-15 18:41 ` [ANN] kgio library / RubyGem Eric Wong
2010-12-22 11:24 ` Iñaki Baz Castillo
2010-12-22 20:27   ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100928030302.GA3452@dcvr.yhbt.net \
    --to=normalperson-rmlxzr9ms24@public.gmane.org \
    --cc=mongrel-unicorn-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \
    --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).