aspose file tools*
The moose likes Servlets and the fly likes How to push tasks onto a queue? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to push tasks onto a queue?" Watch "How to push tasks onto a queue?" New topic
Author

How to push tasks onto a queue?

Michael Cropper
Ranch Hand

Joined: Sep 30, 2009
Posts: 137
I (think) I need some kind of queuing system as part of my web app.

When a user submits details on the form the action is for a servlet which then needs to do a lot of processing (potentially 5-10mins (possibly in the future anyways))

I don't want the user to be sat there waiting for the web app to complete this task as there will also be other users doing the same task too (and the server could get quite busy at times).

So I was wondering if there is something I can use to kind of "pass" this task onto something else which can act as a queuing system and process the tasks in the order they arrived.

This way the task still gets completed and the user isn't sat there waiting for the next "confirmation" page to load.

I have not read up on anything like this yet (mainly because I don't really know what to look for) so I may be asking a daft question. So if anyone has any pointers on information to read up on this subject it would be much appreciated.

Thanks
Michael
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

You may use any of the commercial or open source queueing systems available and use JMS API to place your data as a message. You may further write batch programs that will fetch messages placed by your application, from the queueing system(s) and do the needful. You need to find out how to install and configure queueing systems and the usage of JMS API.


S.D. MADHAN
Not many get the right opportunity !
Michael Cropper
Ranch Hand

Joined: Sep 30, 2009
Posts: 137
Ok thanks, I will have a good read up on all of that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to push tasks onto a queue?