Re: Initiate long running processes from a Tomcat server?
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Mon, 12 Jun 2006 16:44:04 GMT
"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
.
- Follow-Ups:
- References:
- Prev by Date: Re: jar to mobile
- Next by Date: Re: Writing apps for Windows platform in Java? Why?
- Previous by thread: Initiate long running processes from a Tomcat server?
- Next by thread: Re: Initiate long running processes from a Tomcat server?
- Index(es):
Relevant Pages
|
|