prep for release
[zbatery.git] / README
blobaf5ffb0f4dd97f69f3e3faf7b1d4dcf02201dd9a
1 = Zbatery: Rack HTTP server without a fork stuck in it
3 Zbatery is an HTTP server for Rack applications on systems that either
4 do not support fork(), or have no memory (nor need) to run the
5 master/worker model.  It is based on Rainbows! (which is based on
6 Unicorn (which is based on Mongrel)) and inherits parts of each.
7 Zbatery supports your choice of all the thread/fiber/event/actor-based
8 concurrency models and Rack middleware that Rainbows! supports (or will
9 ever support) in a single process.
11 Zbatery will still exploit certain features of Unix for transparent
12 upgrades, log reopening, and graceful stops, but does not rely on them
13 for basic functionality.
15 == Features
17 * Designed for {Rack}[http://rack.rubyforge.org/], the standard for
18   modern Ruby HTTP applications.
20 * Configuration files are compatible with Rainbows!, a superset
21   of the Unicorn
22   {DSL}[http://unicorn.bogomips.org/Unicorn/Configurator.html].
24 * Inherits all features and concurrency models Rainbows! supports
25   (and ever will support): http://rainbows.rubyforge.org/Summary.html
27 * -Untested- Works under operating systems that don't support signals,
28   pipe and fork().  Unicorn 0.95.2+ has rake-compiler support, so
29   compiling the HTTP parser should be easier at least.
31 * -Untested- HTML 5 Web Sockets support
33 == License
35 Zbatery is copyright 2009 by all contributors (see logs in git).
36 It is ultimately based on Mongrel and carries the same license.
38 Mongrel is copyright 2007 Zed A. Shaw and contributors. It is licensed
39 under the Ruby license and the GPL2. See the included LICENSE file for
40 details.
42 Zbatery is 100% Free Software.
44 == Install
46 You may download the tarball from the Rainbows project page on Rubyforge
47 and run setup.rb after unpacking it:
49 http://rubyforge.org/frs/?group_id=8977
51 You may also install it via RubyGems on Gemcutter:
53   gem install zbatery
55 == Usage
57 === for Rack applications
59 In APP_ROOT (where config.ru is located), run:
61   zbatery
63 Zbatery will bind to all interfaces on TCP port 8080 by default.
65 === Configuration File(s)
67 Zbatery will look for the config.ru file used by rackup in APP_ROOT.
69 For deployments, it can use a config file for Unicorn and
70 Rainbows!-specific options specified by the +--config-file/-c+
71 command-line switch.  Zbatery accepts all options found in
72 {Unicorn::Configurator}[http://unicorn.bogomips.org/Unicorn/Configurator.html]
73 as well as the "Rainbows!" block, so you can have the following in your
74 config file:
76     Rainbows! do
77       use :FiberSpawn
78       worker_connections 400
79     end
81 See the Rainbows! configuration
82 {documentation}[http://rainbows.rubyforge.org/Rainbows.html#M000001]
83 for more details.
85 == Disclaimer
87 There is NO WARRANTY whatsoever if anything goes wrong, but let us know
88 and we'll try our best to fix it.
90 This project may be temporary and may eventually have its name encoded
91 with uncrackable ROT13 encryption leaving you with no way to upgrade.
93 == Development
95 Most of the work is done in Rainbows!, Zbatery is just a shim to
96 allow access to Rainbows! without requiring fork() or signals.
98 You can get the latest source via git from the following locations:
100   git://git.bogomips.org/zbatery.git
101   git://repo.or.cz/zbatery.git (mirror)
103 You may browse the code from the web and download the latest snapshot
104 tarballs here:
106 * http://git.bogomips.org/cgit/zbatery.git (cgit)
107 * http://repo.or.cz/w/zbatery.git (gitweb)
109 Inline patches (from "git format-patch") to the mailing list are
110 preferred because they allow code review and comments in the reply to
111 the patch.
113 We will adhere to mostly the same conventions for patch submissions as
114 git itself.  See the Documentation/SubmittingPatches document
115 distributed with git on on patch submission guidelines to follow.  Just
116 don't email the git mailing list or maintainer with Zbatery patches.
118 == Tests
120 There currently are no tests specific to Zbatery.  Keep in mind that
121 Zbatery is only a small shim to drive Rainbows! (and Unicorn)
122 underneath.  Rainbows! and Unicorn both have extensive (but very
123 UNIX-specific) test suites.
125 == Contact
127 All feedback (bug reports, user/development dicussion, patches, pull
128 requests) go to the mailing list/newsgroup.  We are currently
129 borrowing the Rainbows! mailing list since most of our code (and
130 problems) are related to Rainbows! mailto:rainbows-talk@rubyforge.org.