rev: AsyncResponse => DeferredResponse API cleanup
[rainbows.git] / README
blob4c767199f85d233a0e6b378a6ce0913a5ba1e0a2
1 = Rainbows! Unicorn for sleepy apps and slow clients
3 Rainbows! is a HTTP server for sleepy Rack applications.  It is based on
4 Unicorn, but designed to handle applications that expect long
5 request/response times and/or slow clients.  For Rack applications not
6 heavily bound by slow external network dependencies, consider Unicorn
7 instead as it simpler and easier to debug.
9 == \Rainbows! is about Diversity
11 We aim to support as many concurrency models as we can because they all
12 suck; differently.
14 For network concurrency, models we currently support are:
16 * {:ThreadSpawn}[link:Rainbows/ThreadSpawn.html]
17 * {:ThreadPool}[link:Rainbows/ThreadPool.html]
18 * {:Revactor}[link:Rainbows/Revactor.html]
19 * {:Rev}[link:Rainbows/Rev.html]*
21 We have {more on the way}[link:TODO.html] for handling network concurrency.
22 Additionally, we also use multiple processes (managed by Unicorn) for
23 CPU/memory/disk concurrency.
25 \* our \Rev concurrency model is only recommended for slow clients, not
26 sleepy apps.  Additionally it does not support streaming "rack.input" to
27 the application.
29 For application concurrency, we have the Rainbows::AppPool Rack
30 middleware that allows us to limit application concurrency independently
31 of network concurrency.  Rack::Lock as distributed by Rack may also be
32 used to limit application concurrency to one (per-worker).
34 == Features
36 * Designed for {Rack}[http://rack.rubyforge.org/], the standard for
37   modern Ruby HTTP applications.
39 * Built on {Unicorn}[http://unicorn.bogomips.org/], inheriting its
40   process/socket management features
41   such as transparent upgrades and Ruby configuration DSL.
43 * As with Unicorn, it is able to stream large request bodies off the
44   socket to the application while the client is still uploading.  Since
45   \Rainbows! can handle slow clients, this feature is more useful than
46   it is with Unicorn.
48 * Combines heavyweight concurrency (worker processes) with lightweight
49   concurrency (Actors or Threads), allowing CPU/memory/disk to be scaled
50   independently of client connections.  Alternative concurrency models
51   (listed in the TODO) will be supported as we find time for them.
53 == Applications
55 \Rainbows is for the odd things Unicorn sucks at:
57 * 3rd-party APIs (to services outside your control/LAN)
58 * OpenID consumers (to providers outside your control/LAN)
59 * Reverse proxy implementations with editing/censoring
60   (to upstreams outside your control/LAN)
61 * Comet
62 * BOSH (with slow clients)
63 * HTTP server push
64 * Long polling
65 * Reverse Ajax
67 \Rainbows may also be used to service slow clients even with fast
68 applications using the \Rev concurrency model.
70 == License
72 \Rainbows! is copyright 2009 by all contributors (see logs in git).
73 It is based on Mongrel and Unicorn and carries the same license.
75 Mongrel is copyright 2007 Zed A. Shaw and contributors. It is licensed
76 under the Ruby license and the GPL2. See the included LICENSE file for
77 details.
79 \Rainbows! is 100% Free Software.
81 == Install
83 You may download the tarball from the Rainbows project page on Rubyforge
84 and run setup.rb after unpacking it:
86 http://rubyforge.org/frs/?group_id=8977
88 You may also install it via Rubygems on Rubyforge:
90   gem install rainbows
92 == Usage
94 === for Rack applications
96 In APP_ROOT (where config.ru is located), run:
98   rainbows
100 \Rainbows! will bind to all interfaces on TCP port 8080 by default.
102 === Configuration File(s)
104 \Rainbows! will look for the config.ru file used by rackup in APP_ROOT.
106 For deployments, it can use a config file for Unicorn and
107 \Rainbows!-specific options specified by the +--config-file/-c+
108 command-line switch.  \Rainbows! accepts all options found in
109 {Unicorn::Configurator}[http://unicorn.bogomips.org/Unicorn/Configurator.html]
110 as well as the "\Rainbows!" block, so you can have the following in your
111 config file:
113     Rainbows! do
114       use :Revactor
115       worker_connections 400
116     end
118 See the {Rainbows! configuration documentation}[link:Rainbows.html#M000001]
119 for more details.
121 == Development
123 You can get the latest source via git from the following locations
124 (these versions may not be stable):
126   git://git.bogomips.org/rainbows.git
127   git://rubyforge.org/rainbows.git (mirror)
129 You may browse the code from the web and download the latest snapshot
130 tarballs here:
132 * http://git.bogomips.org/cgit/rainbows.git (cgit)
133 * http://rainbows.rubyforge.org/git?p=rainbows.git (gitweb)
135 Inline patches (from "git format-patch") to the mailing list are
136 preferred because they allow code review and comments in the reply to
137 the patch.
139 We will adhere to mostly the same conventions for patch submissions as
140 git itself.  See the Documentation/SubmittingPatches document
141 distributed with git on on patch submission guidelines to follow.  Just
142 don't email the git mailing list or maintainer with \Rainbows! patches.
144 == Disclaimer
146 There is NO WARRANTY whatsoever if anything goes wrong, but let us know
147 and we'll try our best to fix it.
149 == Contact
151 All feedback (bug reports, user/development dicussion, patches, pull
152 requests) go to the mailing list/newsgroup.  Patches must be sent inline
153 (git format-patch -M + git send-email).  No subscription is necessary
154 to post on the mailing list.  No top posting.  Address replies +To:+
155 the mailing list.
157 * email: mailto:rainbows-talk@rubyforge.org
158 * nntp: nntp://news.gmane.org/gmane.comp.lang.ruby.rainbows.general
159 * subscribe: http://rubyforge.org/mailman/listinfo/rainbows-talk
160 * archives: http://rubyforge.org/pipermail/rainbows-talk