SCGI Rails Runner 0.4.0

This is a fast BETA release of the SRR script that aims to be more modular
and easier to manage than previous versions.  This version includes the following
major changes:

* There are now three components:  scgi.rb library, scgi_service, and scgi_ctrl.
* The scgi.rb library implements *only* the SCGI server protocol.  This lets other
	people use SCGI in their frameworks outside rails.  Look at scgi_service for how.
* scgi_service is a single comman that only runs Rails according to a YAML configuration
	file.  This file is created by scgi_ctrl for you based on parameters.
* scgi_ctrl configures scgi_service (using reasonable defaults) and also lets you monitor
	and control the scgi_service.  It uses DRb to do this, so it's cross platform (hopefully).
* A change in the design speeds up the SCGIProcessor by about 50% in most of my requests.
* I have removed the "simple clustering" at the moment until I can come up with a more
	robust method.  It was apparently causing problems on some platforms.

This new design still has rough edges but should hopefully be more extensible.  As an example,
there is also a new scgi_wr command which does most of the scgi_ctrl commands but 
using WEBrick and URIs.  It would be trivial for someone to write a Rails application that did 
this.

This README is just here to get people started.  It covers installation real quick, and
all the things you can do with the new code.  Please try it out and send me any bugs.


INSTALL

1. Unpack the source.
2. Go to the dir.
3. Run "sudo ruby setup.rb".  If you don't use sudo then use su.


CONFIGURING

1. Go to your Rails directory.
2. scgi_ctrl config -e production
	- This makes a config/scgi.yaml file.  Check it out.
3. Use "scgi_ctrl help config" to find out all the options.


RUNNING (UNIX)
1.  Go to your Rails directory.
2. scgi_ctrl start


RUNNING (WINDOWS)
Still haven't fully tested this code on Windows.  Please try it though and tell me what you run into.

1. Go to your Rails directory.
2. scgi_service config/scgi.yaml
	- You actually don't need the config/scgi.yaml, and you can even pass the config file in an ENV
	parameter so that you can configure via Apache or Lighttpd config.


CONTROL

- scgi_ctrl status -- Prints out a status message for you.
- scgi_ctrl reconfig -- Reloads the configuration file so that some soft options can be
	reset like maxconns.   Environment won't change.
- scgi_ctrl stop -- Does a graceful shutdown.  New connections are redirected to /busy.html
	- Give the -f option to force a shutdown.
- scgi_ctrl restart -- Does the graceful shutdown (-f forces) and then uses exec to restart based on config.
	- Combined with the config command you can reconfig then restart fairly seamlessly.
- scgi_ctrl monitor -- Just contually prints the status then waits three seconds.

All of them will either load the proper DRb URL out of config/scgi.yaml, another config file given,
or use the -u option to specify the DRb URL.


QUICK HACK WEBSERVICE

Play with the scgi_wr script to see WEBrick doing most of the above scgi_ctrl stuff for you.
It's pretty simple, just read the source and you'll get it.


SECURITY

Ok, do NOT NOT NOT run this in production.  The password is stored in salted crypt format
in the config/scgi.yaml file so it's about as secure as old unix passwords were (which isn't that
secure).  The biggest thing though is that DRb isn't secured, so the passwords are wide open.
Setting up SSL with DRb isn't too hard, but more than I care to deal with in this release.

I will entertain an option for the scgi_service that completely disables the DRb controller, and
it probably wouldn't be hard for someone to replace the DRb control with signals.  Keep in mind
that signals are probably less secure since they don't have a password at all.  Also, signals
don't work on Windows.
