Rainbows! 0.93.0 - MOAR!!!1
[rainbows.git] / README
blob51c32c8d40d1f5c2b5ab697c1a7f10737b1a1843
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.  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 * {RevFiberSpawn}[link:Rainbows/RevFiberSpawn.html]
17 * {Revactor}[link:Rainbows/Revactor.html]
18 * {ThreadPool}[link:Rainbows/ThreadPool.html]
19 * {Rev}[link:Rainbows/Rev.html]
20 * {ThreadSpawn}[link:Rainbows/ThreadSpawn.html]
21 * {EventMachine}[link:Rainbows/EventMachine.html]
22 * {RevThreadSpawn}[link:Rainbows/RevThreadSpawn.html]
23 * {FiberSpawn}[link:Rainbows/FiberSpawn.html]
24 * {FiberPool}[link:Rainbows/FiberPool.html]
25 * {NeverBlock}[link:Rainbows/NeverBlock.html]
26 * {RevThreadPool}[link:Rainbows/RevThreadPool.html]
27 * {WriterThreadPool}[link:Rainbows/WriterThreadPool.html]
28 * {WriterThreadSpawn}[link:Rainbows/WriterThreadSpawn.html]
30 We have {many more on the way}[link:TODO.html] for handling network
31 concurrency.  Additionally, we also use multiple processes (managed by
32 Unicorn) for robustness and CPU/memory/disk concurrency.
34 We also provide Rainbows::AppPool Rack middleware for some network
35 concurrency models for limiting application concurrency independently of
36 network concurrency.
38 == Features
40 * Designed for {Rack}[http://rack.rubyforge.org/], the standard for
41   modern Ruby HTTP applications.
43 * Built on {Unicorn}[http://unicorn.bogomips.org/], inheriting its
44   process/socket management features such as transparent upgrades and
45   Ruby configuration DSL.
47 * As with Unicorn, it is able to stream large request bodies off the
48   socket to the application while the client is still uploading.  Since
49   \Rainbows! can handle slow clients, this feature is more useful than
50   it is with Unicorn.
52 * Combines heavyweight concurrency (worker processes) with lightweight
53   concurrency (Events/Fibers/Actors/Threads), allowing CPU/memory/disk to
54   be scaled independently of client connections.  More concurrency models
55   (listed in the TODO) will be supported as we find time for them.
57 * We give you {lots of options}[link:Summary.html] with more
58   {on the way}[link:TODO.html].
60 == Applications
62 \Rainbows is mainly designed for the odd things Unicorn sucks at:
64 * Web Sockets (via {Sunshowers}[http://rainbows.rubyforge.org/sunshowers/])
65 * 3rd-party APIs (to services outside your control/LAN)
66 * OpenID consumers (to providers outside your control/LAN)
67 * Reverse proxy implementations with editing/censoring
68   (to upstreams outside your control/LAN)
69 * Comet
70 * BOSH (with slow clients)
71 * HTTP server push
72 * Long polling
73 * Reverse AJAX
74 * real-time upload processing (via {upr}[http://upr.bogomips.org/])
76 \Rainbows can also be used to service slow clients directly even with
77 fast applications.
79 == License
81 \Rainbows! is copyright 2009 by all contributors (see logs in git).
82 It is based on Mongrel and Unicorn and carries the same license.
84 Mongrel is copyright 2007 Zed A. Shaw and contributors. It is licensed
85 under the Ruby license and the GPL2. See the included LICENSE file for
86 details.
88 \Rainbows! is 100% Free Software.
90 == Install
92 You may download the tarball from the Rainbows project page on Rubyforge
93 and run setup.rb after unpacking it:
95 http://rubyforge.org/frs/?group_id=8977
97 You may also install it via RubyGems on RubyGems.org:
99   gem install rainbows
101 == Usage
103 === for Rack applications
105 In APP_ROOT (where config.ru is located), run:
107   rainbows
109 \Rainbows! will bind to all interfaces on TCP port 8080 by default.
111 === Configuration File(s)
113 \Rainbows! will look for the config.ru file used by rackup in APP_ROOT.
115 For deployments, it can use a config file for Unicorn and
116 \Rainbows!-specific options specified by the +--config-file/-c+
117 command-line switch.  \Rainbows! accepts all options found in
118 {Unicorn::Configurator}[http://unicorn.bogomips.org/Unicorn/Configurator.html]
119 as well as the "\Rainbows!" block, so you can have the following in your
120 config file:
122     worker_processes 4 # assuming four CPU cores
123     Rainbows! do
124       use :FiberSpawn
125       worker_connections 100
126     end
128 See the {Rainbows! configuration}[link:Rainbows.html#method-i-Rainbows!]
129 {documentation}[link:Rainbows.html#method-i-Rainbows!]
130 for more details.
132 == Development
134 You can get the latest source via git from the following locations
135 (these versions may not be stable):
137   git://git.bogomips.org/rainbows.git
138   git://repo.or.cz/rainbows.git (mirror)
140 You may browse the code from the web and download the latest snapshot
141 tarballs here:
143 * http://git.bogomips.org/cgit/rainbows.git (cgit)
144 * http://repo.or.cz/w/rainbows.git (gitweb)
146 Inline patches (from "git format-patch") to the mailing list are
147 preferred because they allow code review and comments in the reply to
148 the patch.
150 We will adhere to mostly the same conventions for patch submissions as
151 git itself.  See the Documentation/SubmittingPatches document
152 distributed with git on on patch submission guidelines to follow.  Just
153 don't email the git mailing list or maintainer with \Rainbows! patches.
155 == Disclaimer
157 There is NO WARRANTY whatsoever if anything goes wrong, but let us know
158 and we'll try our best to fix it.
160 == Contact
162 All feedback (bug reports, user/development discussion, patches, pull
163 requests) go to the mailing list/newsgroup.  Patches must be sent inline
164 (git format-patch -M + git send-email).  No subscription is necessary
165 to post on the mailing list.  No top posting.  Address replies +To:+
166 the mailing list.
168 * email: mailto:rainbows-talk@rubyforge.org
169 * nntp: nntp://news.gmane.org/gmane.comp.lang.ruby.rainbows.general
170 * subscribe: http://rubyforge.org/mailman/listinfo/rainbows-talk
171 * archives: http://rubyforge.org/pipermail/rainbows-talk