upgrade to Kgio 2.x and Unicorn 3.x
[rainbows.git] / lib / rainbows / rev.rb
blob1ee705c67ad28e5a10bd1c0e124a10ea080d01c2
1 # -*- encoding: binary -*-
2 require 'rainbows/rev/core'
3 require 'rainbows/rev/client'
5 module Rainbows
7   # Implements a basic single-threaded event model with
8   # {Rev}[http://rev.rubyforge.org/].  It is capable of handling
9   # thousands of simultaneous client connections, but with only a
10   # single-threaded app dispatch.  It is suited for slow clients and
11   # fast applications (applications that do not have slow network
12   # dependencies) or applications that use DevFdResponse for deferrable
13   # response bodies.  It does not require your Rack application to be
14   # thread-safe, reentrancy is only required for the DevFdResponse body
15   # generator.
16   #
17   # Compatibility: Whatever \Rev itself supports, currently Ruby
18   # 1.8/1.9.
19   #
20   # This model does not implement as streaming "rack.input" which
21   # allows the Rack application to process data as it arrives.  This
22   # means "rack.input" will be fully buffered in memory or to a
23   # temporary file before the application is entered.
25   module Rev
27     # :stopdoc:
28     # keep-alive timeout scoreboard
29     KATO = {}
31     # all connected clients
32     CONN = {}
34     if {}.respond_to?(:compare_by_identity)
35       CONN.compare_by_identity
36       KATO.compare_by_identity
37     end
39     autoload :DeferredResponse,'rainbows/rev/deferred_response'
40     autoload :DeferredChunkResponse,'rainbows/rev/deferred_chunk_response'
41     include Core
42     # :startdoc:
43   end
44 end