• Post Reply Bookmark Topic Watch Topic
  • New Topic

Display Status Of Processing  RSS feed

 
James Gordon
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
In the old time, with 4GL, we can easily display the status of a processing at the bottom of the screen. The status would be the "real-time" status of the task eg: "Processing 11 of 1200 records".
However, in web application, is it possible to have such a feature?
What I had in mind is having a javascript timer reloading the page each 5 seconds. But not only that this method doesn't give a "real-time" status indication but might end up taking lots of resources as well (submitting request to server at a fixed interval!).
Any advice if I would need to implement such a feature in a web application?
Are there any better approach?
Thanks in advance.
 
David Hibbs
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, You've got it figured out. =)
Here's an option for you... the good ol' "guess and check" method.
Take some samples of runtimes. Figure out how long they took, and predict a runtime. Then you can use some fancy javascript to run a ticker to 95% or so, at which point you send the request to check on the progress. Just a thought, anyway, if you know the number of records to process, etc. and the time per record should be approximately equal...
 
Dana Hanna
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if you cant estimate (because of load/unexpected network traffic factors), like you say, just reload the page every couple seconds, and show the progress. You can get fancy with javascript and show the windows "file into folder" animation or something of the sort as well between page loads.
You could also develop an applet to be a more direct means of communication, but it depends on many factors including importance of feedback, target platform/browser/audience, and page load speed.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!