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).


In reply to Re: Daemon - Child - Client - Server by tall_man
in thread Daemon - Child - Client - Server by PyroX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.