Joel VanderWerf wrote:
> 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.
> 
> 

While this is a good idea, and actually may prove useful for me in the 
future, it will not help me in this situation. Since all the ruby 
programs will start when the system boots and they never restart.  The 
time saved when starting the ruby programs would be spent starting the 
daemon so it would even out, and possible even take longer.  It's not a 
big deal really.  The normal speed is adequate for the application.  It 
would just be nice to make it a little faster.

-Scott