|Do you know where your variables are?
Managing a long running server side process using CGIby GrandFather (Saint)
|on Jan 27, 2007 at 09:13 UTC
GrandFather has asked for the wisdom of the Perl Monks concerning the following question:
I have been asked by a friend to convert a command line application to have a web interface. As this is the first CGI programming I have done I've taken Ovid's excellent introductory cgi_course and now know
While the web interface is fairly simple - gather a few parameters then kick off a simple process - the process comprises running a very large number of iterations of a simple calculation then generate some statistical results. My problem is: how do I set up a CGI process to do some work that may take between a few hours and a day while letting the user who initiated the process monitor progress and possibly even update parameters and restart the process?
My initial thought is that this could be accomplished by using a file to pass information to a "child" process which performs the actual processing, updating a status file as it goes. Questions are: how do I spawn a child process (for a Windows or *nix server) and is there a better mechanism for interprocess communication than simply using a file?
DWIM is Perl's answer to Gödel