Files | Admin

Notes:

Release Name: 0.90.0

Notes:
Rainbows! is an HTTP server for sleepy Rack applications.  It is based on
Unicorn, but designed to handle applications that expect long
request/response times and/or slow clients.  For Rack applications not
heavily bound by slow external network dependencies, consider Unicorn
instead as it simpler and easier to debug.

* http://rainbows.rubyforge.org/
* rainbows-talk@rubyforge.org
* git://git.bogomips.org/rainbows.git

Changes:

This release should fix ThreadSpawn green thread blocking issues
under MRI 1.8.  Excessive socket closing is avoided when using
Thread* models with Sunshowers (or clients disconnecting
during uploads).

There is a new RevFiberSpawn concurrency model which combines
Rev with the traditional FiberSpawn model.



Changes: Documentation/comparison.haml | 23 +++++- GIT-VERSION-GEN | 2 +- GNUmakefile | 4 +- README | 3 +- Rakefile | 4 +- TODO | 6 +- bin/rainbows | 2 +- lib/rainbows.rb | 49 ++++++++--- lib/rainbows/app_pool.rb | 2 +- lib/rainbows/base.rb | 23 ++--- lib/rainbows/const.rb | 10 +- lib/rainbows/dev_fd_response.rb | 2 +- lib/rainbows/error.rb | 11 ++- lib/rainbows/ev_core.rb | 4 - lib/rainbows/event_machine.rb | 2 +- lib/rainbows/fiber/base.rb | 5 +- lib/rainbows/fiber/io.rb | 24 +++-- lib/rainbows/fiber/rev.rb | 160 +++++++++++++++++++++++++++++++++++ lib/rainbows/rev/core.rb | 2 +- lib/rainbows/rev_fiber_spawn.rb | 29 ++++++ lib/rainbows/revactor.rb | 13 +--- lib/rainbows/thread_pool.rb | 8 ++ t/GNUmakefile | 1 + t/simple-http_RevFiberSpawn.ru | 10 ++ t/simple-http_Revactor.ru | 1 - t/simple-http_ThreadPool.ru | 1 - t/simple-http_ThreadSpawn.ru | 1 - t/sleep.ru | 9 +-- t/t9000.ru | 9 +-- t/worker-follows-master-to-death.ru | 7 +-- 30 files changed, 325 insertions(+), 102 deletions(-) commit 0df219ef8f9a514553e13f2f98575896f6cc7c39 Author: Eric Wong Date: Tue Dec 22 13:38:58 2009 -0800 Rainbows! 0.90.0 This release should fix ThreadSpawn green thread blocking issues under MRI 1.8. Excessive socket closing is avoided when using Thread* models with Sunshowers (or clients disconnecting during uploads). There is a new RevFiberSpawn concurrency model which combines Rev with the traditional FiberSpawn model. commit 8a15fc14067e85c419a31e6d70c2491e65d88e60 Author: Eric Wong Date: Tue Dec 22 13:30:19 2009 -0800 avoid setting "rainbows.autochunk" by default No point in becoming the straw that causes a rehash since hardly anybody uses it. commit ca4c0b2938669f96eb0d71a0911275abb247e418 Author: Eric Wong Date: Tue Dec 22 13:29:09 2009 -0800 base: fix constant resolution under 1.8 for 1.8 bugfix commit 505e0f7e54e6b0ea0823af92d339a4bffdb51dc1 Author: Eric Wong Date: Tue Dec 22 13:11:32 2009 -0800 update TODO commit fa622de470d475f0afc94cb619cc69e7e127830c Author: Eric Wong Date: Tue Dec 22 01:22:32 2009 -0800 common Rainbows.sleep(nr) method We'll export this across the board to all Rack applications to sleep with. This provides the optimum method of sleeping regardless of the concurrency model you choose. This method is still highly not recommended for pure event-driven models like Rev or EventMachine (but the threaded/fiber/actor-based variants are fine). commit cdac4e6b8847754421c6f65baab2ac9a105d746a Author: Eric Wong Date: Tue Dec 22 12:45:03 2009 -0800 cleanup in Rainbows.accept definition commit dc5a3bc59b104086ae80116e597f51f99d8f1e24 Author: Eric Wong Date: Tue Dec 22 12:37:31 2009 -0800 fix README speling fail commit 451ca6997b4f298b436605b7f0af75f369320425 Author: Eric Wong Date: Tue Dec 22 12:46:26 2009 -0800 fix Ruby 1.8 detection for (possible) green thread fix Thanks to Ben Sandofsky for the extra set of eyes commit 537de8098e649406e7f60c89211a345ed852ab0b Author: Eric Wong Date: Tue Dec 22 00:54:19 2009 -0800 bin/rainbows: avoid confusing people with shebang Or it'll confuse them more... Really, it does not matter what the shebang points to as long as long as setup.rb can deal with it. commit cc7beb5dafa71d8918f3129e7fb516f1e20388c0 Author: Eric Wong Date: Tue Dec 22 00:49:37 2009 -0800 README: add RevFiberSpawn commit afb658c11af2120d239b852a24f945b1c23eb625 Author: Eric Wong Date: Tue Dec 22 00:42:48 2009 -0800 tests: enable RevFiberSpawn for 1.9 commit 4cb46cee74ccdf1ce2a9b8fa03459fb4879838f5 Author: Eric Wong Date: Tue Dec 22 00:41:17 2009 -0800 doc: update comparison for RevFiberSpawn commit 19960488441651d689259071fa1be4f6957d681b Author: Eric Wong Date: Tue Dec 22 00:32:04 2009 -0800 new RevFiberSpawn concurrency model This is like the traditional FiberSpawn, but more scalable (but not necessarily faster) as it can use epoll or kqueue. commit ee7fe220ccbc991e1e7cbe982caf48e3303274c7 Author: Eric Wong Date: Mon Dec 21 16:31:28 2009 -0800 possible MRI 1.8 thread fix to avoid blocking accept() Under MRI 1.8, listen sockets do not appear to have the nonblocking I/O flag on by default, nor does it set the nonblocking I/O flag when calling #accept (but it does when using #accept_nonblock, of course). Normally this is not a problem even when using green threads since MRI will internally select(2) on the file descriptor before attempting a blocking (and immediately successful) accept(2). However, when sharing a listen descriptor across multiple processes, spurious wakeups are likely to occur, causing multiple processes may be woken up when a single client connects. This causes a problem because accept(2)-ing on multiple threads/processes for a single connection causes blocking accepts in multiple processes, leading to stalled green threads. This is not an issue under 1.9 where a blocking accept() call unlocks the GVL to let other threads run. commit e962d665c1e27de8d930c3acc51502fa4d147532 Author: Eric Wong Date: Mon Dec 21 11:53:42 2009 -0800 GNUmakefile: push tgz to Rubyforge Oops. commit 7cb8867021fa0d5a9be77f0bd24869fbf75356d0 Author: Eric Wong Date: Sat Dec 19 23:38:09 2009 -0800 Thread*: avoid double close of client socket TeeInput may explicitly close on client disconnects to avoid error messages being written to the socket, likewise with "hack.io" users. commit 8abddc7b98f24ab603414b74cac9b1730dd277d7 Author: Eric Wong Date: Sat Dec 19 22:55:37 2009 -0800 error: (trivial) remove unnecessary whitespace commit af0497398961b6556cae25c8ddd55327a4ad5104 Author: Eric Wong Date: Wed Dec 16 23:59:29 2009 -0800 join_threads method is exclusive to ThreadPool commit 5dea67ecf3dd868e7b375312cdef2c4651b11437 Author: Eric Wong Date: Wed Dec 16 23:57:08 2009 -0800 cleanup: consolidate write_nonblock error handling commit 52ad3f270e758e5bfdfe965cbecbd20d5048062f Author: Eric Wong Date: Wed Dec 16 02:16:23 2009 -0800 fiber/io: split out wait_readable and wait_writable methods This makes them easier to override in subclasses. commit 2ccce76d94046d017a9b02a0b033e3fff9483e98 Author: Eric Wong Date: Wed Dec 16 00:50:23 2009 -0800 get rid of the magic EvCore.setup It gets in the way of Rev/EM-based models that won't use EvCore. It doesn't actually do anything useful except making an extra layer of indirection to follow. commit 51e656e3db593c662e7abdf969dd79570525aac9 Author: Eric Wong Date: Sun Dec 13 23:14:47 2009 -0800 share some constants with Unicorn Make RACK_DEFAULTS == Unicorn::HttpRequest::DEFAULTS and LOCALHOST == Unicorn::HttpRequest::LOCALHOST No point in having a duplicate objects, and it also makes it easier to share runtime constant modifications between servers. commit f4798796921b20130baf57e5accb3be7efaef861 Author: Eric Wong Date: Sun Dec 13 15:19:57 2009 -0800 Rakefile: fix fm_update task