Here is my scenario…..i have a windows service running.
It does a 3 step process, 1st step is it takes a date range from a hosted application and does a couple of insertion,updation and table creations,in 2nd step it fetches a number of records based on the date range from a table(some lacs of records) and processes these each entry and modifies some and writes them into a file,in 3rd step it loads the written files from step 2 into the mysql database using Load Data Local.
The issue i’m facing is in the hosted application that i mentioned in step 1.The application shows a GUI in which the processing date range is shown and since its a time consuming process, i need to show a remaining time during which the windows service will finish the processing(all the 3 steps that i mentioned).
And one more thing the client network speed may vary.
Any ideas about how to tackle this scenario.
I’m writing this application using C# asp.net.
The only way to give an indication of the remaining time is by sampling.
Measure an action and use the result to give an estimate of a future action.
You can NOT give an exact remaining time span because actions will always take a different amount of time.
Another way is by not stating the remaining time but by stating how many steps have been executed so far. This requires you to poll the server for status so you might need to keep status on the server by setting a session variable.