Re: Initiate long running processes from a Tomcat server?



"Steve" <root@xxxxxxxxx> wrote in message news:C0B0336E.BC6C%root@xxxxxxxxxxxx
Hi,

I'm trying to design a web server where users can login, initiate long
running processes on uploaded files, monitor the progress via a web page and
download some results when the process has finished.

My first attempt was to do the file processing in the servlet, but the
browser timed out eventually! I appreciate this is not the way to solve it!

I was wondering if there is a common mechanism for doing this sort of thing
within a Tomcat server? Are any libraries available?

Thanks for any help.

I don't know about libraries, but you'll basically need to create the concept of a job. As soon as the user finishes uploading the file, save what tasks need to be performed on that file, and immediately return to the an "OK, we'll get to it as soon as possible" message to the user.

Potentially, thousands or millions of users might be uploading files at the same time, but maybe only 1 or 2 thread is actually going around doing whatever processing needs to be done.

Users can log in and query the status of the job. Depending on how much detail you want, you might simply say something like "Job is done", "Job is running" or "There are 248 jobs in queue before yours", for example.

You can optionally have a notification system (perhaps via e-mail) to let a user know when their job is done.

- Oliver

.



Relevant Pages

  • Initiate long running processes from a Tomcat server?
    ... I'm trying to design a web server where users can login, ... running processes on uploaded files, monitor the progress via a web page and ... download some results when the process has finished. ...
    (comp.lang.java)
  • Re: PHP Download Limitation 2MB
    ... Maximum allowed size for uploaded files. ... you need that the web server accepts uploads larger than 2MB. ... Apache that's controlled by the following directive: ... Prev by Date: ...
    (comp.lang.php)