Rainbows! Rack HTTP server user/dev discussion
 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,
	rainbows-talk-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).

	http://unicorn.bogomips.org/kgio/
	git://git.bogomips.org/kgio.git
	http://git.bogomips.org/cgit/kgio.git

[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
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


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

* Re: [ANN] kgio library / RubyGem
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Wong @ 2010-11-15 18:41 UTC (permalink / raw)
  To: mongrel-unicorn, rainbows-talk

Eric Wong <normalperson@yhbt.net> wrote:
> 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!

OK, it's got a separate mailing list at kgio@librelist.com, now.

Apparently it's garnered some attention and dalli[1] is one of the first
projects to start using it.

Homepage and git repository locations remain the same:

	http://unicorn.bogomips.org/kgio/
	git://git.bogomips.org/kgio.git
	http://git.bogomips.org/cgit/kgio.git

[1] - git://github.com/mperham/dalli

-- 
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


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

* Re: [ANN] kgio library / RubyGem
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Iñaki Baz Castillo @ 2010-12-22 11:24 UTC (permalink / raw)
  To: unicorn list; +Cc: rainbows-talk

2010/9/28 Eric Wong <normalperson@yhbt.net>:
> 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).

Very interesting project :)

A typo in the doc:

---------------------
kgio_wait_readable()
Blocks the running Thread indefinitely until self IO object is writable
---------------------

Should be "readable", right? :)


-- 
Iñaki Baz Castillo
<ibc@aliax.net>
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

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

* Re: [ANN] kgio library / RubyGem
  2010-12-22 11:24 ` Iñaki Baz Castillo
@ 2010-12-22 20:27   ` Eric Wong
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2010-12-22 20:27 UTC (permalink / raw)
  To: Iñaki Baz Castillo; +Cc: unicorn list, Rainbows! list

Iñaki Baz Castillo <ibc@aliax.net> wrote:
> A typo in the doc:
> 
> ---------------------
> kgio_wait_readable()
> Blocks the running Thread indefinitely until self IO object is writable
> ---------------------
> 
> Should be "readable", right? :)

Fixed, thanks!

-- 
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
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:[~2010-12-22 20:30 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 inbox:

	../../../rainbows.git

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).