Randy Kramer
3/18/2006 1:20:00 PM
I need to write what might be called a Ruby service or server(?)--a Ruby
program that:
* runs only one instance even if "invoked" multiple times
* can be sent additional "commands" via CLI commands, e.g., if the name of
the program is, for example, "program" I can issue multiple CLI commands
like:
program <parameters>
If program is not running, it will start and perform appropriate actions based
on the parameters.
If program is running, the existing instance of the program will receive those
parameters and perform appropriate actions.
At the moment (and maybe permanently ;-) I'm drawing a blank as to what a
program like that is called (service, server, ...?), and where to dig to
learn how to implement such a thing (preferably in Ruby).
Hints?
Initially I plan to implement this under Linux--some day it may get ported to
Windows, etc.
Thanks!
Randy Kramer
Incidentally, if the program crashes, the next invocation of the program will
restart it and recover as much of the previous "context" as possible (which
is, of course, only what has been recorded to disk).