Ara.T.Howard wrote:
> how about a simple 'ruby-interpreter' server written as a drb object.  the
> server could simply start ruby via a fork'd process or via a pipe, and 
> run the
> code in question; something similar in spirit to mod_ruby.  you would
> eliminate the start up costs only with this method, but your post seem to
> suggest this might be o.k./sufficient

Cool idea. It's been in the back of my mind to do something like that. 
The ruby daemon doesn't even have to use DRb--it could just listen on a 
socket for the name of a .rb file to load. A ruby daemon would make it 
more efficient to use ruby programs as "commands" in shell scripts (not 
that its really inefficient now). Also, it would reduce memory usage if 
you've got a lot of scripts running at the same time.

One way to use this would be to send the server a .rb file that loads up 
a bunch of libs and then daemonizes goes into the server code again, 
creating a specialized ruby daemon that has already loaded the stuff 
that takes some time. I use a similar approach for development already 
by having a "puts; gets; fork" loop after each major stage in loading 
libs and data. But the daemon approach would make it easier to start 
separate forked apps from different command lines.