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.
17 * Designed for {Rack}[http://rack.github.io/], the standard for
18 modern Ruby HTTP applications.
20 * Configuration files are compatible with Rainbows!, a superset
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.bogomips.org/Summary.html
27 * Web Sockets support (via {Cramp}[http://cramp.in/])
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.
39 You may install it via RubyGems on RubyGems.org:
43 Zbatery depends on Rainbows!, and in turn, Unicorn. Despite Unicorn and
44 Rainbows! being Unix-only, the Unicorn HTTP parser C extension should
45 build on non-Unix-like systems (unverified).
49 === for Rack applications
51 In APP_ROOT (where config.ru is located), run:
55 Zbatery will bind to all interfaces on TCP port 8080 by default.
57 === Configuration File(s)
59 Zbatery will look for the config.ru file used by rackup in APP_ROOT.
61 For deployments, it can use a config file for Unicorn and
62 Rainbows!-specific options specified by the +--config-file/-c+
63 command-line switch. Zbatery accepts all options found in
64 {Unicorn::Configurator}[http://unicorn.bogomips.org/Unicorn/Configurator.html]
65 as well as the "Rainbows!" block, so you can have the following in your
70 worker_connections 666
73 See the Rainbows! configuration
74 {documentation}[http://rainbows.bogomips.org/Rainbows/Configurator.html]
79 There is NO WARRANTY whatsoever if anything goes wrong, but let us know
80 and we'll try our best to fix it.
84 Most of the work is done in Rainbows!, Zbatery is just a shim to
85 allow access to Rainbows! without requiring fork() or signals.
87 You can get the latest source via git from the following locations:
89 git://bogomips.org/zbatery.git
90 git://repo.or.cz/zbatery.git (mirror)
92 You may browse the code from the web and download the latest snapshot
95 * http://bogomips.org/zbatery.git (cgit)
96 * http://repo.or.cz/w/zbatery.git (gitweb)
98 Inline patches (from "git format-patch") to the mailing list are
99 preferred because they allow code review and comments in the reply to
102 We will adhere to mostly the same conventions for patch submissions as
103 git itself. See the Documentation/SubmittingPatches document
104 distributed with git on on patch submission guidelines to follow. Just
105 don't email the git mailing list or maintainer with Zbatery patches.
109 There currently are no tests specific to Zbatery. Keep in mind that
110 Zbatery is only a small shim to drive Rainbows! (and Unicorn)
111 underneath. Rainbows! and Unicorn both have extensive (but very
112 UNIX-specific) test suites.
116 All feedback (bug reports, user/development discussion, patches, pull
117 requests) go to the mailing list/public-inbox. We are currently
118 borrowing the Rainbows! mailing list since most of our code (and
119 problems) are related to Rainbows! mailto:rainbows-public@bogomips.org.