I've got a situation where a customer will make a request of a web app and needs to receive information back from the web app anywhere from 30 minutes to an hour later. This is well beyond the length of a reasonable HTTP timeout, and even if I extended the timeout and kept the session alive, I'd be worried about running out of resources as this will get many, many hits.
Can you suggest an approach that might work here, please? Would you put an app server at each end and just pass http calls to servlets back and forth? An ESB with two clients so they can pass messages back and forth?
Thanks in advance for your time!
First I would like to get clarification of your requirement,
By the requirement mentioned by you do you mean:
Option 1. Customer will request some form and it might take him to fill that form for half hour to hour and then submit the data?
If this is the case then I would suggest you to look into Adobe AIR or Google Gear, which temporarily stores the data at client location and then sync with the application database later...this way the user dont need to keep connected to your application server and this works fine with web application, but you need to install AIR or Gears at client location.
Option 2. Do you mean that when the user submits data the processing takes too long such that user has to wait for 30 mins to an hour before able to see any result
If your processing takes too long in such case you should try using some Schedular like Quartz,
1. here user will submit a request.
2. You submit the processing request to Schedular which will process the request parallelly in seperate thread.
3. You return to your User giving message that the job is submitted for procession should either check his/her results after 30 min or hour, you can also give him/her message that an email will be dispatched once job is completed.
4. Either send a mail and link to result screen when job is completed or have a page where user will be notified of the job status whether it is completed and link to see the result if job is completed.
I am not sure if I answered your question...If you have further question do post it...