about summary refs log tree commit homepage
DateCommit message (Collapse)
2010-07-06cleanup error handling for aborted downloads
We shouldn't ever spew errors to the stderr/logger on client disconnects (ECONNRESET/EPIPE/etc...).
2010-07-06rev: avoid unnecessary seeking when using sendfile
There's no need to ever change the underlying offset of a file descriptor when using sendfile(), so don't. This allows us to avoid contention in the kernel/filesystem and eventually reuse the same filesystem file descriptor for serving multiple requests.
2010-07-05rev: properly enable post-fork sendfile() usage
We need to load sendfile-using parts after the "sendfile" library is loaded.
2010-07-04refactor response body handling for sendfile(2)
This hopefully allows the "sendfile" gem to be required anywhere in the Rainbows!/Unicorn config file, and not have to be required via RUBYOPT or the '-r' command-line switch. We also modularize HttpResponse and avoids singleton methods in the response path. This (hopefully) makes it easier for individual concurrency models to share code and override individual methods.
2010-07-04rev/client: s/sendfile/rev_sendfile/
Avoid confusing people with an overloaded method name
2010-07-04revactor: properly zero buffer on zero reads
While we're at it, fix a comment, too.
2010-07-04thread_pool: force threads to wakeup on shutdown
We may use a blocking accept() loop if there is only a single listener. In that case threads may not be able to exit if a SIGQUIT is received, so force them to run when joining.
2010-06-30rev: add sendfile support
This should improve performance for static file responses.
2010-06-30dev_fd_response: avoid redeclaring Rainbows module
slowly cleaning up the generated RDoc
2010-06-30deferred_response: remove needless include
2010-06-28TODO: extra item for byte-range responses
2010-06-28add preliminary sendfile (1.0.0) gem support
This still needs work and lots of cleanup, but the basics are there. The sendfile 1.0.0 RubyGem is now safe to use under MRI 1.8, and is superior to current (1.9.2-preview3) versions of IO.copy_stream for static files in that it supports more platforms and doesn't truncate large files on 32-bit platforms.
2010-06-28fiber/base: reuse process_client logic in base
This fleshes out Rainbows::Fiber::IO with a few more methods for people using it.
2010-06-28(style) prefer "until" instead of "while !"
2010-06-28revactor: constant/namespace cleanups
2010-06-28base: constant/namespace cleanup
2010-06-27http_response: make this a module, not a class
No point in using a class here, there's no object
2010-06-27http_response: (nitpick) simplify conditional logic
2010-06-27http_response: cleanup documentation
No point in documenting our internals and overwhelming users.
2010-06-24sendfile: update docs for Rack::Sendfile
Rack::Contrib::Sendfile moved into Rack in December 2009.
2010-06-21add Rainbows::Configurator module
Make it easier to link to the Rainbows! configuration documentation without anchors. This also reduces the amount of code we spew into Unicorn::Configurator.
2010-06-21tests: enable ActorSpawn test for rbx
2010-06-21rev: documentation update for #write method
2010-06-21dev_fd_response: disable under Rubinius for now
We can't use it effectively in Rubinius yet, and it's broken due to the issue described in: http://github.com/evanphx/rubinius/issues/379
2010-06-21dev_fd_response: cleanup and reorganization
There's no need to #dup the middleware object, just use a custom Rainbows::DevFdResponse::Body object.
2010-06-21test_isolate: bump unicorn dependency
2010-06-21test: no need for IO#sync=true in async-response tests
We only read from the IO pipe and never write to it
2010-06-21tests: avoid embedded command-line switches in tests
They're ugly and potentially non-portable to other servers. They also make Unicorn + Rubinius unhappy, which makes us unhappy as well.
2010-06-21rev: restore Ruby 1.8.6 compatibility
2010-06-21bump async_sinatra test dependencies
Everything should be working under Ruby 1.9.2(-preview3) now.
2010-06-18rev: cleanup write method
I was originally experimenting with setsockopt to increase the kernel buffer sizes in a loop, but the benefits were negligible at best.
2010-06-18rev: avoid extraneous data copy for small responses
For small responses that can fit inside a kernel socket buffer, copying that data into an IO::Buffer object is a waste of precious memory bandwidth.
2010-06-18fiber/{base,io}: use arrays instead of hashes for r/w accounting
This gives a tiny performance improvement to the FiberSpawn and FiberPool concurrency models.
2010-06-18fiber/base: more accurate sleep timeout
Not that many people will actually call Rainbows.sleep outside of tests...
2010-06-18avoid needless HeaderHash#to_hash calls
HeaderHash objects can only be used as headers without violating Rack::Lint in Rack 1.1.0 or later.
2010-06-18prefer Array#[] lookup to Array#first/Array#last
Array#[] lookups are slightly faster under both rbx and 1.9, and easier to read.
2010-06-16test_isolate: fix ruby engine usage
Oops, looks like 1.9.1 exports the RUBY_ENGINE constant.
2010-06-11update test infrastructure to support Rubinius
Rubinius still has a few issues that prevent 100% support, but it basically works if log rotation or USR2 upgrades aren't required. Tickets for all known issues for Rubinius have been filed on the project's issue tracker. * rbx does not support -i/-p yet, so rely on MRI for that * "io/nonblock" is missing * avoiding any optional Gems for now (EM, Rev, etc..)
2010-06-11alt working_directory test from Unicorn
2010-06-11rely on Unicorn 0.991.0 for tests
2010-06-10bin/rainbows: sync up with latest Unicorn
This will allow us to be working_directory-aware as far as config.ru goes.
2010-06-10add Rainbows::ServerToken middleware
Some folks can now show off their Rainbows! installation
2010-06-10my-tap-lib: fix race condition in verbose mode
Don't try to redirect until we know our FIFO consumers are ready for us. This only seems to happen with bash and not ksh... commit d0a0883eaaeec37800ca5cd07647b7b66a00c453 in Unicorn
2010-06-09http_server: use super instead of alias_method
duh!
2010-06-08gemspec: bump unicorn dependency to 0.990.0
2010-06-07README: update with Zbatery info
2010-06-06tests: t9001: avoid needless filesystem activity
2010-06-06centralize body => IO conversion logic
Since EventMachine and Rev shared the same logic for optimizing and avoiding extra file opens for IO/File-ish response bodies, so centralize that. For Ruby 1.9 users, we've also enabled this logic so ThreadPool, ThreadSpawn, WriterThreadPool, and WriterThreadSpawn can take advantage of Rainbows::DevFdResponse-generated bodies while proxying sockets.
2010-06-04Rainbows! 0.94.0 - one eight ate my homework! v0.94.0
This release fixes corrupted large response bodies for Ruby 1.8 users with the WriterThreadSpawn and WriterThreadPool models introduced in 0.93.0. This bug did not affect Ruby 1.9 users nor the users of any older concurrency models. There is also a strange new Rainbows::Sendfile middleware. It is used to negate the effect of Rack::Contrib::Sendfile, if that makes sense. See the RDoc or http://rainbows.rubyforge.org/Rainbows/Sendfile.html for all the gory details. Finally, the RDoc for our test suite is on the website: http://rainbows.rubyforge.org/Test_Suite.html I wrote this document back when the project started but completely forgot to tell RDoc about it. Personally, this test suite is one of my favorite parts of the project.
2010-06-04sendfile: update RDoc for this middleware.