in reply to (OT) Handling long-running queries with mod_perl/Mason

On your "submit" request, return a page that says "please wait a moment" with a 3 second refresh to a related URL; then start your query/report process with $r->register_cleanup. Have that report place the results in a standard location when it's done.

When you receive the request for the related URL from the client, check to see if the report has finished; if you can't show it to them yet, return a page that says "still working on it, click here to receive the results in email instead" which goes to a third URL to register the email request in some kind of a queue.

  • Comment on Re: (OT) Handling long-running queries with mod_perl/Mason