From: Pat Maddox Date: 2006-03-19T03:11:39+09:00 Subject: Re: How to write a Ruby service(?)? On 3/18/06, Randy Kramer wrote: > On Saturday 18 March 2006 08:19 am, Randy Kramer wrote: > > 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: > > Oops, wait--I'm starting to wake up now--that would be a daemon, wouldn't it? > Off to Google [Ruby daemon]. > > But, any hints appreciated! > > Randy Kramer > > Well fwiw, usually you would write two apps - a client and a server. The server will be invoked once and daemonized, and you use the client to issue commands. You can connect to the client either via TCP or unix domain sockets. Pat