Zbatery 4.1.1 - small bugfix
[zbatery.git] / README
blob5f5c103c740199271c49b7fc226f2ba1246cecc8
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 * Web Sockets support (via {Cramp}[http://cramp.in/])
29 == License
31 \Zbatery is copyright 2009,2010,2011 by all contributors (see logs in git).
32 \Zbatery is licensed under the Ruby (1.8) license or the GPL (v2 or v3).
33 See the included {LICENSE}[link:LICENSE.html] file for more details.
35 \Zbatery is 100% Free Software.
37 == Install
39 You may download the tarball from the Rainbows project page on Rubyforge
40 and run setup.rb after unpacking it (and installing Unicorn and Rainbows!):
42 http://rubyforge.org/frs/?group_id=8977
44 You may also install it via RubyGems on RubyGems.org:
46   gem install zbatery
48 Zbatery depends on Rainbows!, and in turn, Unicorn.  Despite Unicorn and
49 Rainbows! being Unix-only, the Unicorn HTTP parser C extension should
50 build on non-Unix-like systems (unverified).
52 == Usage
54 === for Rack applications
56 In APP_ROOT (where config.ru is located), run:
58   zbatery
60 Zbatery will bind to all interfaces on TCP port 8080 by default.
62 === Configuration File(s)
64 Zbatery will look for the config.ru file used by rackup in APP_ROOT.
66 For deployments, it can use a config file for Unicorn and
67 Rainbows!-specific options specified by the +--config-file/-c+
68 command-line switch.  Zbatery accepts all options found in
69 {Unicorn::Configurator}[http://unicorn.bogomips.org/Unicorn/Configurator.html]
70 as well as the "Rainbows!" block, so you can have the following in your
71 config file:
73     Rainbows! do
74       use :ThreadSpawn
75       worker_connections 666
76     end
78 See the Rainbows! configuration
79 {documentation}[http://rainbows.rubyforge.org/Rainbows/Configurator.html]
80 for more details.
82 == Disclaimer
84 There is NO WARRANTY whatsoever if anything goes wrong, but let us know
85 and we'll try our best to fix it.
87 == Development
89 Most of the work is done in Rainbows!, Zbatery is just a shim to
90 allow access to Rainbows! without requiring fork() or signals.
92 You can get the latest source via git from the following locations:
94   git://bogomips.org/zbatery.git
95   git://repo.or.cz/zbatery.git (mirror)
97 You may browse the code from the web and download the latest snapshot
98 tarballs here:
100 * http://bogomips.org/zbatery.git (cgit)
101 * http://repo.or.cz/w/zbatery.git (gitweb)
103 Inline patches (from "git format-patch") to the mailing list are
104 preferred because they allow code review and comments in the reply to
105 the patch.
107 We will adhere to mostly the same conventions for patch submissions as
108 git itself.  See the Documentation/SubmittingPatches document
109 distributed with git on on patch submission guidelines to follow.  Just
110 don't email the git mailing list or maintainer with Zbatery patches.
112 == Tests
114 There currently are no tests specific to Zbatery.  Keep in mind that
115 Zbatery is only a small shim to drive Rainbows! (and Unicorn)
116 underneath.  Rainbows! and Unicorn both have extensive (but very
117 UNIX-specific) test suites.
119 == Contact
121 All feedback (bug reports, user/development discussion, patches, pull
122 requests) go to the mailing list/newsgroup.  We are currently
123 borrowing the Rainbows! mailing list since most of our code (and
124 problems) are related to Rainbows! mailto:rainbows-talk@rubyforge.org.