! MouseHole 1.3 on its way -- let's talk about it
Lennon Day-Reynolds
rcoder at gmail.com
Mon Dec 19 12:20:07 EST 2005
On 12/19/05, mental at rydia.net <mental at rydia.net> wrote:
> I'm pretty sure this is mostly a thing with Ruby IO, and the recent
> discussions on ruby-talk are underscoring this feeling for me.
>
> It would be nice to have event-driven IO facility in Ruby like is
> available in TCL or glib. I've written some pretty decent
> proxies/servers (tho I never tried this sort of HTTP hackery) using
> those, and it tends to work out a lot better performance-wise than a
> bunch of blocking threads.
It's not exactly a high-level event-driven architecture, but we do
have Kernel#select, which makes the same sort of non-blocking,
callback-driven event model possible. The Medusa library adopted by
the Python/Zope folks might not be a bad place to start for a simple
example of using the select() call as a sort of "event kernel".
There's also Twisted, and on the Perl side, POE, to mine for design ideas.
I also recall some discussion on ruby-talk of someone trying to write
a Ruby extension to wrap libevent, but IIRC, the Ruby threading model
blocked (pun indended) the whole deal.
--
Lennon
rcoder.net
More information about the Mousehole-scripters
mailing list