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