java - Get status of servlet request before the response is returned -


Good evening,

I am in the process of writing a Java servlet (Straits 2, Tomcat, JSP Etc.) which is capable of doing some pretty complex simulations. It may take up to 2 minutes to complete and a graph of the result will return. It is trivial to calculate the percentage of simulation because the process works by repeating the nuances of the same time.

I have to know whether anyone has ever estimated to use any client-side technology to complete any percentage of the whole process during simulation to get the number of complete cycles at different points related to servlet processing questions. This can then be displayed in the client browser as a bar.

Any ideas, advice, resources will be highly appreciated.

Thank you,

Alex

In your database, There is a table to maintain a list of simulations with the progress of their server-counting.

In your web-application, use AJAX to query the server every few seconds (what I want based on loads 1-20) and update a graphical progress bar. Javascript libraries have simple timer-based AJAX functions to work properly.

There are some details to find out, like if simulation is completed in DB (can be useful logging information), but overall, it should be quite simple.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -