On Thu, 26 Aug 2004 00:29:34 +0900, MiG <mig / 1984.cz> wrote: > I have more than 10 ruby programs running on server. They sleep for the > most of time but each of them consumes 2MB of memory. > > I have an idea of client-server Ruby interpreter. There will be only one > running interpreter as a daemon (but not detached, I'm D.J. > Bernstein's daemontools fan :-))) > > Everything what will change will be the header of scripts: > #!/usr/bin/ruby-client > > The ruby-client would send it's stdin to server and get output back. > I've tried to write this server in Ruby as UNIXServer using "load" > method to run scripts, but I don't know how to redirect stdin/stdout. > I wrote $stdin/$stdout wrapper but it globally changes every > puts/gets/read/write/etc. I need to buffer it separately in each server > thread (for each client). > > I think it should be useful: > 1. less memory usage when many scripts are running at once > 2. fast - no starting time of interpreter > 3. can use ruby in chroot > > Is it possible to write it in Ruby or should it be a low-level feature? Look into DRb. -austin -- Austin Ziegler * halostatue / gmail.com * Alternate: austin / halostatue.ca