web rubyists-

i have been thinking quite abit about the things i would like to see in a web
app server for ruby, some of the things which have sprung to mind have been :

  * simplified persistence
    - normal ruby scoping rules
    - ability to cache in memory (process space) or on disk

  * fast execution times
    - on par with fastcgi or mod_ruby

  * simplicity
    - just say no to jboss

  * compatibility
    - well, at least with *nix cgi capable web server

  * familiarity
     - standard ruby cgi api

  * flexibility
    - use whatever template library you like
    - use CGI tag methods
    - whatever...

  * 'installlessness'
    - i hate modules

  * self-motivated
    - process has ability to do work even when no requests are pending

so.  i think i may have the beginnings of something along those lines.  it's
not much, so don't laugh, but here is the design :

  * a simple C program cgi 'responder' (FAST) which delegates cgi requests to
    a persistent backend ruby cgi server, communcating via named pipes (fifos)

that's it.

i have a simple demo of this (massively prototypical and certainly quite
buggy) available at :

  http://eli.fsl.noaa.gov/lib/ruby/acgidemo/

baby docs live at :

  http://eli.fsl.noaa.gov/lib/ruby/acgidemo/doc/


it's simple enough that by looking at the files

  http://eli.fsl.noaa.gov/lib/ruby/acgidemo/index.c
  http://eli.fsl.noaa.gov/lib/ruby/acgidemo/acgi.rb
  http://eli.fsl.noaa.gov/lib/ruby/acgidemo/index.rb

you should have a complete understanding of the idea.  if you've worked with
fastcgi, you'll see the design immeadiately.

my next plans are to implement process pooling and session affinity (not
needed now because there is only one instance!) and then i'll have, in
essence, all the funtionality of fastcgi with none of the headaches.

i'm very curious to know what other may think of this approach, and if any any
would like to contribute to work on such a project.  my main concern is
whether people think this *design* is worth pursuing not considering impl.

-a

ps.  ab showed this approach to be roughly 10 times faster that an equivalent
ruby cgi program.  that's fast enough IMHO, especially considering that any
current cgi program could be ported in about 1 minute.

pss. the example program is running at

  http://eli.fsl.noaa.gov/lib/ruby/acgidemo/index.cgi

--
  ====================================
  | Ara Howard
  | NOAA Forecast Systems Laboratory
  | Information and Technology Services
  | Data Systems Group
  | R/FST 325 Broadway
  | Boulder, CO 80305-3328
  | Email: ahoward / fsl.noaa.gov
  | Phone:  303-497-7238
  | Fax:    303-497-7259
  ====================================