about summary refs log tree commit homepage
path: root/lib/rainbows/event_machine
DateCommit message (Collapse)
2011-05-10configurator: move validation logic over
There's actually no reason we can't have these methods in Rainbows::Configurator where it's easier to document nowadays.
2011-02-04bump required Unicorn dependency for Kgio
We want to use the singleton methods in Kgio to reduce conditionals.
2011-01-21ev_core: force input to be given to app_call
No need to setting an ivar for most requests
2011-01-21ev_core: garbage reduction
We don't need to allocate new string objects for short-lived strings. We'll pay the price of a constant lookup instead.
2011-01-17ev_core: reuse buffer to avoid GC thrashing
Single-threaded concurrency models can reuse a single buffer to avoid thrashing memory and causing unnecessary GC activity.
2011-01-11event_machine: buffer reads when waiting for async.callback
We cannot trigger on_read events and invoke the HTTP parser and modify @env while we're waiting for an application to run async.callback. We also need to clear (and *maybe* re-set) @deferred if we're writing from async.callback
2011-01-11event_machine/client: rename ivar for consistency with Coolio
Both use @deferred to refer to the state where there's a deferred response body in the queue.
2011-01-11event_machine/client: remove unused :body accessor
Nobody uses it anymore
2011-01-07event_machine: fold write_response back into client
No point in having too many modules to search around (for both hackers and the runtime).
2011-01-07event_machine: cleanup async logic
Since we support keepalive now, setting @state can be harmful and the comment is out-of-date.
2011-01-06event_machine: refactor async.callback for keepalive
async.callback will be useful with Coolio (and more!) soon, so ensure it works as well as the rest of Rainbows!
2011-01-06event_machine: factor out async.callback handling
This will allow Coolio to use it, too.
2011-01-06simplify keepalive_timeout accounting
Easier just to use an instance variable
2011-01-04prefer Hash#merge! to Hash#update for consistency
It's more likely to be in the method cache since Rack::URLMap uses it and also is more consistent when looking at profiling output against various concurrency models.
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-04event_machine: cleanup response_pipe
No need to pass unnecessary variables to response_pipe, just let the client handle it all.
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-28several response body#close fixes
Some middlewares require the Rack env to be preserved all the way through to close, so we'll ensure all request models preserve it. We also need to better response body wrappers/proxies always get fired properly when returning. IO.copy_stream and "sendfile" gem users could hit cases where wrappers did not fire properly.
2010-12-26event_machine: split out server and client classes
This should make things easier to find
2010-07-27event_machine: fix pipelining of static files
EM::FileStreamer writes may be intermingled with the headers in the subsequent response if we enable processing of the second pipelined response right away, so wait until the first response is complete before hitting the second one. This also avoids potential deep stack recursion in the unlikely case where too many requests are pipelined.
2010-07-19ensure stream response bodies get closed
Some middlewares such as Clogger rely on wrapping the body having the close method called on it for logging.
2010-07-19prefer Integer#to_s(16) to sprintf("%x\r\n")
It's slightly faster as theres no string to parse and also no garbage format string to be discarded.
2010-07-19event_machine: split out uncommonly used modules
Some applications may not use Response*Pipe and TryDefer at all, so there's no reason to pollute the runtime with extra nodes to mark during GC.