doc: update comparison and README
[rainbows.git] / README
blob679953086fccdde87488bb2a35ba2b766551f9e6
1 = Rainbows! - Unicorn for sleepy apps and slow clients
3 \Rainbows! is an 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.
7 For Rack applications not heavily bound by slow external network
8 dependencies, consider Unicorn instead as it simpler and easier to
9 debug.
11 If you're on a small system, or write extremely tight and reliable code
12 and don't want multiple worker processes, check out
13 {Zbatery}[http://zbatery.bogomip.org/], too. Zbatery can use all the
14 crazy network concurrency options of \Rainbows! in a single worker
15 process.
17 == \Rainbows! is about Diversity
19 We aim to support as many concurrency models as we can because they all
20 suck; differently.
22 For network concurrency, models we currently support are:
24 * {Coolio}[link:Rainbows/Coolio.html]
25 * {CoolioFiberSpawn}[link:Rainbows/CoolioFiberSpawn.html]
26 * {CoolioThreadPool}[link:Rainbows/CoolioThreadPool.html]
27 * {CoolioThreadSpawn}[link:Rainbows/CoolioThreadSpawn.html]
28 * {Epoll}[link:Rainbows/Epoll.html]
29 * {EventMachine}[link:Rainbows/EventMachine.html]
30 * {FiberPool}[link:Rainbows/FiberPool.html]
31 * {FiberSpawn}[link:Rainbows/FiberSpawn.html]
32 * {NeverBlock}[link:Rainbows/NeverBlock.html]
33 * {Revactor}[link:Rainbows/Revactor.html]
34 * {ThreadPool}[link:Rainbows/ThreadPool.html]
35 * {ThreadSpawn}[link:Rainbows/ThreadSpawn.html]
36 * {WriterThreadPool}[link:Rainbows/WriterThreadPool.html]
37 * {WriterThreadSpawn}[link:Rainbows/WriterThreadSpawn.html]
38 * {XEpoll}[link:Rainbows/XEpoll.html]
39 * {XEpollThreadPool}[link:Rainbows/XEpollThreadPool.html]
40 * {XEpollThreadSpawn}[link:Rainbows/XEpollThreadSpawn.html]
42 We have {many more on the way}[link:TODO.html] for handling network
43 concurrency.  Additionally, we also use multiple processes (managed by
44 Unicorn) for robustness and CPU/memory/disk concurrency.
46 We also provide Rainbows::AppPool Rack middleware for some network
47 concurrency models for limiting application concurrency independently of
48 network concurrency.
50 == Features
52 * Designed for {Rack}[http://rack.rubyforge.org/], the standard for
53   modern Ruby HTTP applications.
55 * Built on {Unicorn}[http://unicorn.bogomips.org/], inheriting its
56   process/socket management features such as transparent upgrades and
57   Ruby configuration DSL.
59 * As with Unicorn, it is able to stream large request bodies off the
60   socket to the application while the client is still uploading.  Since
61   \Rainbows! can handle slow clients, this feature is more useful than
62   it is with Unicorn.
64 * Combines heavyweight concurrency (worker processes) with lightweight
65   concurrency (Events/Fibers/Actors/Threads), allowing CPU/memory/disk to
66   be scaled independently of client connections.  More concurrency models
67   (listed in the TODO) will be supported as we find time for them.
69 * We give you {lots of options}[link:Summary.html] with more
70   {on the way}[link:TODO.html].
72 == Applications
74 \Rainbows! is mainly designed for the odd things Unicorn sucks at:
76 * 3rd-party APIs (to services outside your control/LAN)
77 * OpenID consumers (to providers outside your control/LAN)
78 * Reverse proxy implementations with editing/censoring
79   (to upstreams outside your control/LAN)
80 * Comet
81 * BOSH (with slow clients)
82 * HTTP server push
83 * Long polling
84 * Reverse AJAX
85 * real-time upload processing (via {upr}[http://upr.bogomips.org/])
87 \Rainbows! can also be used to service slow clients directly even with
88 fast applications.
90 == License
92 \Rainbows! is copyright 2009,2010 by all contributors (see logs in git).
93 It is based on Mongrel 1.1.5 and Unicorn and carries the same license.
95 Mongrel is copyright 2007 Zed A. Shaw and contributors. It is licensed
96 under the Ruby (1.8) license and the GPL2. See the included LICENSE file for
97 details.
99 \Rainbows! is 100% Free Software.
101 == Install
103 You may download the tarball from the \Rainbows! project page on Rubyforge
104 and run setup.rb after unpacking it:
106 http://rubyforge.org/frs/?group_id=8977
108 You may also install it via RubyGems on RubyGems.org:
110   gem install rainbows
112 == Usage
114 === for Rack applications
116 In APP_ROOT (where config.ru is located), run:
118   rainbows
120 \Rainbows! will bind to all interfaces on TCP port 8080 by default.
122 === Configuration File(s)
124 \Rainbows! will look for the config.ru file used by rackup in APP_ROOT.
126 For deployments, it can use a config file for Unicorn and
127 \Rainbows!-specific options specified by the +--config-file/-c+
128 command-line switch.  \Rainbows! accepts all options found in
129 {Unicorn::Configurator}[http://unicorn.bogomips.org/Unicorn/Configurator.html]
130 as well as the "\Rainbows!" block, so you can have the following in your
131 config file:
133     worker_processes 4 # assuming four CPU cores
134     Rainbows! do
135       use :FiberSpawn
136       worker_connections 100
137     end
139 See the {Rainbows! configuration}[link:Rainbows/Configurator.html]
140 {documentation}[link:Rainbows/Configurator.html]
141 for more details.
143 == Development
145 You can get the latest source via git from the following locations
146 (these versions may not be stable):
148   git://bogomips.org/rainbows.git
149   git://repo.or.cz/rainbows.git (mirror)
151 You may browse the code from the web and download the latest snapshot
152 tarballs here:
154 * http://bogomips.org/rainbows.git (cgit)
155 * http://repo.or.cz/w/rainbows.git (gitweb)
157 Inline patches (from "git format-patch") to the mailing list are
158 preferred because they allow code review and comments in the reply to
159 the patch.
161 We will adhere to mostly the same conventions for patch submissions as
162 git itself.  See the Documentation/SubmittingPatches document
163 distributed with git on on patch submission guidelines to follow.  Just
164 don't email the git mailing list or maintainer with \Rainbows! patches.
166 == Disclaimer
168 There is NO WARRANTY whatsoever if anything goes wrong, but let us know
169 and we'll try our best to fix it.
171 == Contact
173 All feedback (bug reports, user/development discussion, patches, pull
174 requests) go to the mailing list/newsgroup.  Patches must be sent inline
175 (git format-patch -M + git send-email).  No subscription is necessary
176 to post on the mailing list.  No top posting.  Address replies +To:+
177 the mailing list.
179 * email: mailto:rainbows-talk@rubyforge.org
180 * nntp: nntp://news.gmane.org/gmane.comp.lang.ruby.rainbows.general
181 * subscribe: http://rubyforge.org/mailman/listinfo/rainbows-talk
182 * archives: http://rubyforge.org/pipermail/rainbows-talk