zbatery.git  about / heads / tags
Zbatery HTTP server for Rack
$ git log --pretty=format:'%h %s (%cs)%d'
1943b2f README: reference yahns (2015-03-01)
	(HEAD -> master)
affd74c switch docs + website to olddoc (2015-01-13)
8bc42c5 doc: fix pandoc HTML generation (2014-05-14)
2383ed7 zbatery 4.2.0 (2014-05-14)
	(tag: v4.2.0)
e3a8072 update for Rainbows! compatibility (2014-05-14)
262ad72 warn about premature grandparent death on daemonization (2014-05-14)
4479008 update license to GPLv2+ (2014-05-14)
6051c3f rubyforge death updates (2014-05-14)
5692526 Rakefile: kill raa_update task (2013-09-30)
ecaa8be Add -N or --no-default-middleware option. (2013-01-29)
...

$ git cat-file blob HEAD:README
= Zbatery: Rack HTTP server without a fork stuck in it

Zbatery is an HTTP server for Rack applications on systems that either
do not support fork(), or have no memory (nor need) to run the
master/worker model.  It is based on Rainbows! (which is based on
Unicorn (which is based on Mongrel)) and inherits parts of each.
Zbatery supports your choice of all the thread/fiber/event/actor-based
concurrency models and Rack middleware that Rainbows! supports (or will
ever support) in a single process.

If you're on GNU/Linux and overwhelmed by options in zbatery,
consider {yahns}[http://yahns.yhbt.net/] as it has fewer options,
optional fork usage, and more energy-efficient during non-peak traffic.

Zbatery will still exploit certain features of Unix for transparent
upgrades, log reopening, and graceful stops, but does not rely on them
for basic functionality.

== Features

* Designed for {Rack}[http://rack.github.io/], the standard for
  modern Ruby HTTP applications.

* Configuration files are compatible with Rainbows!, a superset
  of the Unicorn
  {DSL}[http://unicorn.bogomips.org/Unicorn/Configurator.html].

* Inherits all features and concurrency models Rainbows! supports
  (and ever will support): http://rainbows.bogomips.org/Summary.html

* Web Sockets support (via {Cramp}[http://cramp.in/])

== License

\Zbatery is copyright 2009,2010,2011 by all contributors (see logs in git).
\Zbatery is licensed under the Ruby (1.8) license or the GPL (v2 or v3).
See the included {LICENSE}[link:LICENSE.html] file for more details.

\Zbatery is 100% Free Software.

== Install

You may install it via RubyGems on RubyGems.org:

  gem install zbatery

Zbatery depends on Rainbows!, and in turn, Unicorn.  Despite Unicorn and
Rainbows! being Unix-only, the Unicorn HTTP parser C extension should
build on non-Unix-like systems (unverified).

== Usage

=== for Rack applications

In APP_ROOT (where config.ru is located), run:

  zbatery

Zbatery will bind to all interfaces on TCP port 8080 by default.

=== Configuration File(s)

Zbatery will look for the config.ru file used by rackup in APP_ROOT.

For deployments, it can use a config file for Unicorn and
Rainbows!-specific options specified by the +--config-file/-c+
command-line switch.  Zbatery accepts all options found in
{Unicorn::Configurator}[http://unicorn.bogomips.org/Unicorn/Configurator.html]
as well as the "Rainbows!" block, so you can have the following in your
config file:

    Rainbows! do
      use :ThreadSpawn
      worker_connections 666
    end

See the Rainbows! configuration
{documentation}[http://rainbows.bogomips.org/Rainbows/Configurator.html]
for more details.

== Disclaimer

There is NO WARRANTY whatsoever if anything goes wrong, but let us know
and we'll try our best to fix it.

== Development

Most of the work is done in Rainbows!, Zbatery is just a shim to
allow access to Rainbows! without requiring fork() or signals.

You can get the latest source via git from the following locations:

  git://bogomips.org/zbatery.git
  git://repo.or.cz/zbatery.git (mirror)

You may browse the code from the web and download the latest snapshot
tarballs here:

* http://bogomips.org/zbatery.git (cgit)
* http://repo.or.cz/w/zbatery.git (gitweb)

Inline patches (from "git format-patch") to the mailing list are
preferred because they allow code review and comments in the reply to
the patch.

We will adhere to mostly the same conventions for patch submissions as
git itself.  See the Documentation/SubmittingPatches document
distributed with git on on patch submission guidelines to follow.  Just
don't email the git mailing list or maintainer with Zbatery patches.

== Tests

There currently are no tests specific to Zbatery.  Keep in mind that
Zbatery is only a small shim to drive Rainbows! (and Unicorn)
underneath.  Rainbows! and Unicorn both have extensive (but very
UNIX-specific) test suites.

== Contact

All feedback (bug reports, user/development discussion, patches, pull
requests) go to the mailing list/public-inbox.  We are currently
borrowing the Rainbows! mailing list since most of our code (and
problems) are related to Rainbows! mailto:rainbows-public@bogomips.org.

# heads (aka `branches'):
$ git for-each-ref --sort=-creatordate refs/heads \
	--format='%(HEAD) %(refname:short) %(subject) (%(creatordate:short))'
* master       README: reference yahns (2015-03-01)

# tags:
$ git for-each-ref --sort=-creatordate refs/tags \
	--format='%(refname:short) %(subject) (%(creatordate:short))'
v4.2.0       zbatery 4.2.0 (2014-05-14) tar.gz
v4.1.2       Zbatery 4.1.2 - we don't fork, but our apps may! (2011-12-05) tar.gz
v4.1.1       Zbatery 4.1.1 - small bugfix (2011-09-02) tar.gz
v4.1.0       Zbatery 4.1.0 - pull in latest changes from unicorn 4.1.0 (2011-08-20) tar.gz
v4.0.0       Zbatery 4.0.0 - another Rainbows! resync (2011-06-27) tar.gz
v3.4.0       Zbatery 3.4.0 - another Rainbows! resync (2011-05-21) tar.gz
v3.3.0       Zbatery 3.3.0 - another Rainbows! resync (2011-05-16) tar.gz
v3.1.0       Zbatery 3.1.0 - we stole release notes from Rainbows! (2011-02-11) tar.gz
v3.0.0       Zbatery 3.0.0 - Rainbows! 3.0.0 resync (2011-01-11) tar.gz
v0.6.0       Zbatery 0.6.0 - Rainbows! 2.1.x resync (2010-12-29) tar.gz
...

git clone https://yhbt.net/zbatery.git