in reply to Daemon - Child - Client - Server

The first stage of your idea, having a cgi script talk to a daemon process and start up another process, is no problem. I've used IO:Socket for that purpose several times.

The real trick is getting updates back to your page asynchrononously as the child process generates them. Yes, you could have them happen only when the browser user hits a refresh button, but that's not terribly effective.

Without using something active in the page, such as a java applet or perl plus plugin I don't know a good solution.

Update: There are all sorts of ways to communicate to a running process on the same machine without a socket. You could use named pipes, signals, or write to a regular file it is monitoring. If it has a GUI, you can generate Windows events (on Windows) or X windows events (on Linux).

Replies are listed 'Best First'.
Re: Re: Daemon - Child - Client - Server
by Tomte (Priest) on Feb 15, 2003 at 18:12 UTC

    The real trick is getting updates back to your page asynchrononously as the child process generates them. Yes, you could have them happen only when the browser user hits a refresh button, but that's not terribly effective.
    What about <meta/>-refresh?
    AFAIK every browser understands this. Sure enough, it's just kind of a mechanized button-press and occurs independent of data-changes/-updates, but its a viable solution.

    regards,
    tomte


    Edit: added second sentence.