1 %h2 core features and compatibility
6 %th.tee rack.input streaming
54 %td.mod RevThreadSpawn
103 %td.mod WriterThreadPool
110 %td.mod WriterThreadSpawn
118 RevThread* + 1.8 requires Rev >= 0.3.2 for reasonable performance
120 waiting on Rubinius for better signal handling
122 rack.input streaming is what makes
123 %a(href="http://upr.bogomips.org/") upload progress,
126 rack.input streaming is NOT compatible with current versions of nginx
127 or any proxy that fully buffers request bodies before proxying.
128 Keep in mind request body buffering in nginx is a good thing in all
129 other cases where rack.input streaming is not needed.
131 %h2 application requirements
136 %th.slowio slow I/O (backend, not client)
137 %th.thr thread safety
138 %th.reent single thread reentrant
147 %a(href="http://rev.rubyforge.org/")Rev,
148 %a(href="http://revactor.org/")Revactor,
151 %a(href="Rainbows/Fiber/IO.html")Fiber::IO
156 %td.slowio thread-safe Ruby
162 %a(href="http://rev.rubyforge.org/") Rev
167 %td.slowio thread-safe Ruby
173 %a(href="http://rubyeventmachine.com") EventMachine
177 %td.mod RevThreadSpawn
180 %a(href="http://rev.rubyforge.org/") Rev
186 %a(href="Rainbows/Fiber/IO.html") Rainbows::Fiber::IO
192 %a(href="Rainbows/Fiber/IO.html") Rainbows::Fiber::IO
197 %td.slowio thread-safe Ruby
203 %a(href="http://www.espace.com.eg/neverblock") NeverBlock,
204 %a(href="http://rubyeventmachine.com") EventMachine
208 %td.mod RevThreadPool
211 %a(href="http://rev.rubyforge.org/") Rev
215 %td.mod RevFiberSpawn
217 %a(href="Rainbows/Fiber/IO.html") Rainbows::Fiber::IO
221 %td.mod WriterThreadPool
226 %td.mod WriterThreadSpawn
232 Requirements for single thread reentrancy are loose in that there is
233 no risk of race conditions and potentially mutually exclusive to
234 thread-safety. In the case where a Fiber yields while holding a
235 resource and another Fiber attempting to acquire it may raise
236 an error or worse, deadlock the entire process.
238 Slow I/O means anything that can block/stall on sockets including
239 3rd-party APIs (OpenID providers included) or slow database queries.
240 Properly run Memcached (within the same LAN) is fast and not a blocker.
241 Slow I/O on POSIX filesystems only includes a few operations, namely
242 on UNIX domain sockets and named pipes. Nearly all other operations
243 on POSIX filesystems can be considered "fast", or at least
246 WriterThread{Pool,Spawn} will require thread safety if your response
247 body is dynamically generated during the body#each call.
249 %h2 middlewares and frameworks
256 %a(href="Rainbows/DevFdResponse.html") DevFdResponse
258 %a(href="Rainbows/AppPool.html") AppPool
260 %a(href="http://rack.rubyforge.org/doc/Rack/Lock.html") Rack::Lock
268 %td.async lots of RAM :P
275 %td.async Revactor itself
282 %td.async standard Ruby
289 %td.async DevFdResponse
296 %td.async standard Ruby
303 %td.async async_sinatra, Cramp, rack-fiber_pool
306 %td.mod RevThreadSpawn
310 %td.async standard Ruby
317 %td.async Rainbows::Fiber::IO, Rainbows.sleep
324 %td.async Rainbows::Fiber::IO, Rainbows.sleep
331 %td.async standard Ruby
338 %td.async NeverBlock, async_sinatra
341 %td.mod RevThreadPool
345 %td.async Rev, standard Ruby
348 %td.mod RevFiberSpawn
352 %td.async Rev, Rainbows::Fiber::IO, Rainbows.sleep
354 %td.mod WriterThreadPool
358 %td.async Standard Ruby in response body only
359 %td.ws response body only
361 %td.mod WriterThreadSpawn
365 %td.async Standard Ruby in response body only
366 %td.ws response body only
369 "No!" means it's fundamentally incompatible, use an
370 %a(href="Rainbows/AppPool.html") AppPool
374 NeverBlock also supports a :pool_size option which is one less
375 layer of complexity than using AppPool.
377 NeverBlock can neuter the Mutex class so Rack::Lock effectively
378 becomes a no-op with:
380 %code require "never_block/frameworks/rails"
381 (before Rails is loaded)
383 Everything that's DevFdResponse-compatible can use it for passing
384 async responses through