about summary refs log tree commit homepage
path: root/lib/rainbows/fiber/io.rb
DateCommit message (Collapse)
2015-11-21bump to unicorn 5.0.1, use monotonic clock
The timeout (mis)feature in unicorn uses the monotonic clock if available. We must follow suit to avoid having our timeout functionality completely broken.
2011-06-11doc: remove docs for Rainbows::Fiber::* APIs
Do not encourage their use, really.
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-04-26doc: stop recommending Fiber* stuff
Too much NIH and too fragile.
2011-03-15fiber/io: fix broken call to Kgio.trywrite
Fortunately it's a deprecated class that nobody uses...
2011-02-06kill some unnecessary &block usage
We were needlessly allocating objects even when using yield.
2011-02-04bump required Unicorn dependency for Kgio
We want to use the singleton methods in Kgio to reduce conditionals.
2010-12-27doc: misc cleanups and additions for RDoc
This is also our website, so we need to document the new Cool.io-based concurrency options for users and point existing Rev* users to it.
2010-12-27fiber/io: avoid allocating Range objects for slicing
It's slightly faster this way, but string slicing sucks anyways :<
2010-12-27fiber/*: more efficient keepalive_timeout expiry
We can use the same interface as Rainbows::Fiber.sleep to avoid blindly waking up readers at ever scheduler invocation.
2010-11-19upgrade to Kgio 2.x and Unicorn 3.x
Kgio 2.0.0 has a superior API and less likely to conflict or blow up with other applications. Unicorn 3.x requires Kgio 2.x, too.
2010-11-05avoid Errno::EAGAIN, harder
Errno::EAGAIN is still a problem under Ruby 1.9.2, so try harder to avoid it and use kgio methods. Even when 1.9.3 is available, kgio will still be faster as exceptions are slower than normal return values.
2010-11-04avoid Kgio::WaitReadable/WaitWritable constants
The underlying symbolic names are easier to type and recommended.
2010-10-26doc: RDoc updates
Once again we avoid documenting internals on the public website and use code comments for other developers.
2010-10-22code shuffling for kgio
Despite the large number of changes, most of it is code movement here.
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-07-29fiber/io: reuse buffer in Rainbows::Fiber::IO#each
This makes life easier for the lazy GC when proxying large responses (and also improves memory locality).
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-06fix string slicing under 1.9 after short writes
Fortunately this only affects the hardly-used FiberSpawn and FiberPool concurrency models, and also unreleased revisions of Rev. 1.9 encoding is tricky to handle right when doing I/O in Ruby...
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-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-02-26avoid leaks if app uses Rainbows::Fiber::IO
For the very rare apps out there using Rainbows::Fiber::IO, the FiberSpawn and FiberPool (but not RevFiberSpawn) models could leak memory if the app-created Rainbows::Fiber::IO objects were dereferenced without being removed from the RD/WR hashes.
2009-12-16fiber/io: split out wait_readable and wait_writable methods
This makes them easier to override in subclasses.
2009-11-26Fiber*: cleanup scheduling, fix keepalive
Both FiberSpawn and FiberPool share similar main loops, the only difference being the handling of connection acceptance. So move the scheduler into it's own function for consistency. We'll also correctly implement keepalive timeout so clients get disconnected at the right time.
2009-11-25add FiberSpawn concurrency model
This one seems a easy to get working and supports everything we need to support from the server perspective. Apps will need modified drivers, but it doesn't seem too hard to add more/better support for wrapping IO objects with Fiber::IO.