Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

Initiate long running processes from a Tomcat server?

Thread view: 
Steve - 10 Jun 2006 08:29 GMT
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.

Signature

Regards,
Steve

"...which means he created the heaven and the earth... in the DARK! How good
is that?"

Oliver Wong - 12 Jun 2006 17:44 GMT
> Hi,
>
[quoted text clipped - 12 lines]
>
> 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
Steve - 12 Jun 2006 19:34 GMT
On 12/6/06 17:44, in article oRgjg.29575$771.28803@edtnps89, "Oliver Wong"
<owong@castortech.com> wrote:

>     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
[quoted text clipped - 11 lines]
>     You can optionally have a notification system (perhaps via e-mail) to
> let a user know when their job is done.

Thanks very much, Oliver.

My original thinking was along these lines. I'm glad you've confirmed them -
at least I'm going in the right direction!

Its given me something to think about with jobs, job managers, queues, etc.

Thanks again.

Signature

Regards,
Steve

"...which means he created the heaven and the earth... in the DARK! How good
is that?"



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.