If you can build a way for the process to report on its status (such that another script can then monitor it), you can likely convert the whole thing to use what's called 'server push'.

There's a few different variations, but the methods that I've used are the multipart/x-mixed-replace trick, where you send multiple HTML documents with status updates and then the final one when done. I've also used more 'web-app' type systems, where the page is set up, but populated/updated with javacript after the initial draw. I find the first one easier, but not all browsers (eg, IE) support it.

In any case, you need to make sure that your server is treating your CGIs as 'NPH' (non-parsed-headers ... ie, it won't wait for all of the content to come down before it emits it to the client).


In reply to Re: Update on controlling long-running processes via CGI by jhourcle
in thread Update on controlling long-running processes via CGI by dannyhmg

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.