about summary refs log tree commit homepage
path: root/lib/rainbows/revactor.rb
DateCommit message (Collapse)
2011-04-26revactor: remove documentation for internal methods
2011-04-26revactor: do not recommend, upstream is dormant
2011-03-20fix various warnings with "check-warnings" target
Run under 1.9.3dev
2011-01-06eliminate G constant and just use the Rainbows! module
Code organization is hard :<
2011-01-04globally refactor Range handling for responses
Rack::Utils::HeaderHash is still very expensive in Rack 1.2, especially for simple things that we want to run as fast as possible with minimal interference. HeaderHash is unnecessary for most requests that do not send Content-Range in responses.
2011-01-04simplify per-client keepalive state checks
This lets us simplify repetitive checks worry less about properly maintaining/closing client connections for each concurrency model we support.
2010-12-27revactor: split out tee_socket and use autoload
Some applications never need TeeSocket, and we don't have to worry about thread-safety with Revactor.
2010-12-26more :: prefix elimination
This should make things easier on the eyes.
2010-12-08respect "rewindable_input false" in Unicorn config
This was completely overlooked for the Rainbows 2.0.x releases.
2010-12-08rev+revactor: fix LARGE pipelined uploads
Large uploads behave differently with regard to buffering, and there were bugs in the way the Rev and Revactor backends handled uploads.
2010-11-19revactor: fix braindamaged commit/coding style
Oops, last commit was rushed
2010-11-19simpler keepalive check for synchronous models
Unicorn 3.x includes HttpParser#next? which will reset the parser for keepalive requests without extra steps.
2010-11-16reimplement client_max_body_size handlers
This allows the client_max_body_size implementation to not rely on Unicorn::TeeInput internals, allowing it to be used with Unicorn::StreamInput (or any other (nearly) Rack::Lint-compatible input object).
2010-10-21unicorn 2.x updates + kgio
We get basic internal API changes from Unicorn, code simplifications coming next.
2010-09-28start using kgio library
It removes the burden of byte slicing and setting file descriptor flags. In some cases, we can remove unnecessary peeraddr calls, too.
2010-08-28"keepalive_timeout 0" (really) disables keepalive
Although this behavior is mentioned on the documentation, this was broken under EventMachine, Rev*, and Revactor. Furthermore, we set the "Connection: close" header to allow the client to optimize is handling of non-keepalive connections.
2010-08-02revactor: implement sendfile and range support
Due to the synchronous nature of Revactor, we can be certain sendfile won't overstep the userspace output buffering done by Rev.
2010-07-29revactor: Actor-aware dev_fd_response proxying
Proxying regular Ruby IO objects while Revactor is in use is highly suboptimal, so proxy it with an Actor-aware wrapper for better scheduling.
2010-07-19refactor response handling for each concurrency model
This will give each concurrency model more control over particular code paths and serving static files.
2010-07-10doc: avoid documenting internals on RDoc website
Since we suck at building websites, we just rely on RDoc as a website builder. And since Rainbows! is an application server (and not a programming library), our internal API should be of little interest to end users. Anybody interested in Rainbows! (or any other project) internals should be reading the source.
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-04revactor: properly zero buffer on zero reads
While we're at it, fix a comment, too.
2010-06-28(style) prefer "until" instead of "while !"
2010-06-28revactor: constant/namespace cleanups
2010-06-28base: constant/namespace cleanup
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-05-04revactor: match IO behavior for readpartial wrapper
IO#readpartial on zero bytes will always return an empty string, so ensure the emulator for Revactor does that as well.
2010-05-03cleanup request size limiting for TeeInput users
WAvoid mucking with Unicorn::TeeInput, since other apps may depend on that class, so we subclass it as Rainbows::TeeInput and modify as necessary in worker processes. For Revactor, remove the special-cased Rainbows::Revactor::TeeInput class and instead emulate readpartial for Revactor sockets instead.
2010-03-28cleanup: avoid redundant REMOTE_ADDR logic
Every concurrency model does this the same way. This removes the Rainbows::Const::LOCALHOST constant and may break some existing apps that rely on it.
2010-02-27don't bother supporting platforms without FD_CLOEXEC
No point in having extra code around for platforms we don't care about.
2010-02-27revactor: cleanups to avoid instance_eval
instance_variable_{set,get} are faster, but equally ugly
2010-02-27revactor: document our EMFILE handling strategy
2009-12-16cleanup: consolidate write_nonblock error handling
2009-12-11env["hack.io"] for Fiber*, Revactor, Thread* models
This exposes a client IO object directly to the underlying application.
2009-12-01more consistent code for worker timeout/exits
We now correctly exit!(2) if our master can't kill us.
2009-12-01revactor: avoid unbounded memory growth :x
This model has basically been rewritten to avoid unbounded memory growth (slow without keepalive) due to listeners not properly handling :*_closed messages. Performance is much more stable as a result, too.
2009-11-28always set FD_CLOEXEC if available
Some people fork processes, so it avoid hanging a connection open because of that...
2009-11-26cleanup and refactor error handling
Make sure app errors get logged correctly, and we no longer return a 500 response when a client EOFs the write end (but not the read end) of a connection.
2009-11-18make keepalive_timeout configurable
And change the default to 2 seconds, most clients can render the page and load all URLs within 2 seconds.
2009-11-18revactor: :timeout for reading headers in TCP sockets
We'll be getting a keepalive_timeout setting soon, clients with 300 second idle keepalives are ridiculous and Ruby objects are still not that cheap in 1.9
2009-11-11cleanup error handling pieces
Unicorn 0.94.0 got a more generic handle_error function that's useful in the Thread* models. The Revactor one is a little different but similar to be worth refactoring to match our standard pieces.
2009-11-06cleanup worker heartbeat and master deathwatch
It turns out neither the EventMachine and Rev classes checked for master death in its heartbeat mechanism. Since we managed to forget the same thing twice, we now have a test case for it and also centralized the code to remove duplication.
2009-10-27revactor: require 0.1.5, remove 0.1.4 workarounds
Also new are added basic HTTP tests for UNIX domain socket handling (for all models, now, of course).
2009-10-18revactor: switch to a 1 second heartbeat
Like everybody else... Closing the listener sockets doesn't seem to wakeup the actors reliably and since it's easier to use a 1 second heartbeat than correct signal/messaging for all the rest of the other clients, we'll just do that instead of relying on one-off signal handlers.
2009-10-17refactor graceful shutdowns again, harder
We use the "G" global constant from the Rev model everywhere to simplify things a little. Test cases are more consistent now, too.
2009-10-14documentation updates (mostly on network models)
2009-10-11revactor: fix graceful shutdown timeouts
2009-10-11revactor: continue fchmod beat in graceful exit
Avoid overloading the "alive" variable here and wakeup less frequently as well to do the fchmod.
2009-10-11revactor: graceful death of keepalive clients
We'll finish processing the current request and set the "Connection: close" header if possible.
2009-10-11revactor: cleanups and remove redundancy