Re: Very long operations with FastCGI
"Jason P Sage" <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Organization | Jegas |
| Message-ID | <000001c6bce0$06e64bd0$0201a8c0@dev01> |
Personally I think this is an application "user interface" issue more than anything. I could be way off but. I've written CGI and ASP stuff that, like yours, literally take way to long to get a finish result the normal way . and I've got around this by having a "landing zone" that my application checks when it draws, say, the main navigation menu/homepage . and if there is something in the landing zone (results of a long process, perhaps a temp file sitting in a directory all ready to be piped to a web browser (usually I do a UID or session ID filename for the "static (but was dynamically made) webpage and have it available in that its sitting in a regular static web directory ready for consumption). The bottom line is that my BIG PROCESS sends out a message warning its going to take awhile (right away!) to the user, with a link back to my main menu. When the main menu "draws" it scans for these "big process" static out files, and if they exist, the main page has a little "area" with however many of these "generated static" files might be there for this user. Then the user can click the link (because its only a link when the big process is finished and the resultant file is moved to the "static web directory") and see the result whenever. I usually set this kind of thing up so that when the user logs out (or times out) that part of the "cleanup" is remove any leftover static files like that. Hope this helps spark an idea or two or something. Jason P Sage -----Original Message----- From: fastcgi-developers-bounces+jasonpsage=jegas.com-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org [mailto:fastcgi-developers-bounces+jasonpsage=jegas.com-xGejAJT2w6woRjzL5dk3hA@public.gmane.org.com] On Behalf Of Mitch Jackson Sent: Thursday, August 10, 2006 7:48 PM To: fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org Subject: [FASTCGI] Very long operations with FastCGI I have a long-running operation to spawn from a perl script within the FastCGI environment. I would like the script to cause the user's browser to redirect to a 'view operation status' page, and continue to do the processing of the operation in the background. I see two obvious ways to do this. First using the HTTP header 'redirect: [url]' and the other by writing a page with a meta refresh tag. Once I have written a redirect command to the user's browser, how do I signal to the server and the browser that i'm done sending input, so the server will flush the buffer and deliver the output, and the browser will acknowledge this session has completed and do it's thing, instead of waiting for more output from the web server. Thanks, /mitch ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/