From tony at medioh.com Sun Feb 1 21:20:31 2009 From: tony at medioh.com (Tony Arcieri) Date: Sun, 1 Feb 2009 19:20:31 -0700 Subject: [Rev-talk] ANN: Rev 0.2.4, a libev-based event framework, now with Ruby 1.8.7 and 1.9.1 support Message-ID: Rev is a high performance event library for Ruby, based around the libev C library. It's similar to EventMachine, but builds on the Ruby core types including IO, Socket/TCPSocket and the Ruby OpenSSL library, and exposes an object-oriented interface to event reception. Rev also forms the basis of the Revactor actor-based concurrency library for Ruby 1.9 (see http://revactor.org). This release of Rev includes support for Ruby 1.9.1 and will allow you to continue using Revactor on Ruby 1.9.1. Also included is support for Ruby 1.8.7. Support for 1.8.6 is still included as well. This release also brings with it initial support for Windows, contributed by Roger Pack. There isn't presently a gem available for Windows but we hope to have one soon. Also included is an upgrade to the latest version of libev, version 3.52. You can grab this release from: http://rubyforge.org/frs/?group_id=5080 Or "gem install rev" as soon as the gem has propagated to all of the mirrors. Additional information about Rev is available at: http://rev.rubyforge.org/rdoc/ -- Tony Arcieri medioh.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos at olivepeak.com Sun Feb 8 07:24:08 2009 From: carlos at olivepeak.com (Carlos Carrasco) Date: Sun, 8 Feb 2009 13:24:08 +0100 Subject: [Rev-talk] [PATCH] Optionally pass descriptors to Rev::IOWatcher.initialize Message-ID: <8649cc890902080424x46dd23fdr1ecf6c73b46cc4bc@mail.gmail.com> After experimenting a bit with ruby-pg, Rev and the world's fastest pure Ruby 1-line web server (request_buffer =~ /\x0d\x0a\x0d\x0a/) I started to get EBADF errors under light load testing (ab -c 2 and higher, or even -c 1 for 5+ seconds). I tracked down the source of the errors to this: SQLRequester.new(IO.for_fd(pg_connection.socket), 'r') where SQLRequester is my subclass of Rev::IOWatcher. The problem appears to be Ruby's IO.for_fd() doing something that eventually makes the socket go bad and/or making the postgresql client library to freak out. Since PGconn.socket is already a plain Fixnum of the descriptor, and ev_io_init takes an int with the descriptor, I've modified Rev::IOWatcher.initialize to optionally accept a Fixnum in place of the IO object and pass it directly to ev_io_init. Doing this has stoped the EBADF errors. Thanks for Rev! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: add_initialize_desc_param.diff Type: application/octet-stream Size: 1376 bytes Desc: not available URL: