You'd certainly have to adjust you servers request time out parameters to allow the connection to remain open for up to 10 min plus
If you want to avoid having any sort of app running in the clients browser (i.e.
applet, flash6 which can hit a DB, etc), then you could use a meta-refresh in the web page (a pull rather than a push, which most browsers support) to poll a servlet on the status of the calculation. Have a controller servlet that instantiates a thread (or another servlet, I guess) to do the calculation. Here's a technique to do that.
1) client requests a calculation to a controller servlet
2) The controller contains a static map (class scope obviously) and, in this, places the user's sessionId as the key and the calculation thread object)
i.e.
protected static Map currentProcesses;
static {
currentProcesses = new HashMap();
}
public void doPost( blah, blah ) {
if( startCal ) {
long sessionId = request.getSession().getId();
MyCalcThread thread = new MyCalcThread( ... );
currentProcesses.put( sessionId+"", thread );
// Then do step 3).
}
else if( checkProgress ) {
// look up the thread in the map using the
// session id and get an update.
// Then do step 4).
}
}
3) The servlet responds by writing back a status web page that has a meta refresh header set to check back with the controller servlet.
4) The controller can continue to send back new pages with updated statuses if you want.
5) this will continue until the calculation is done.
Now, I've done each of these things here and there but not in this complete form (my brainstorming). So I'm sure there will be some issues but maybe there is an idea or two you can use.
Sean