views:

42

answers:

2

0 down vote favorite

I have a daily launched multi-threaded loading service. I would like to keep tack of the percentage progress of the loader. I was thinking that it would be good to have an update column on a database table that writes the %Progress. However, I have learned that this may not be a good idea as there will there be a large overhead(5k updates per minute).

I have been informed that the progress indication is best exposed as a webservice.

Can someone please explain to me how I could implement this? What will the webservice output - xml data such as '21.5% Complete' or otherwise? How would a client appication determine the progress - I assume the webservice should expose some sort of notification event that a client application would implement and listen to update?

A: 

we have aysnc webservice, that runs the long running job, we use a secondary method on the webservice to query the database and return the value to the UI, so we could have multiple jobs running and return the value.

Not elegant but it works.

Cheers

Iain

Iain
A: 

Keep it simple.

Create a web service with 2 methods, updateProgress and getProgress. all the web service has to do store the the Progress in a static variable.

Your loading service just posts the updates and your client polls for progress and whatever rate you consider acceptable.

Doobi