In a strict ajax post/response to a web service you get the response immediately.

I've got a setup where a report is produced by a .bat file running on the server - it's Process.Start'd by another web service.

When that report process completes it sets a value in a table saying that report 000123 is now done.

I want the browser to know this fact as quickly as possible.

Most reports run quickly - under 60 seconds - but some can take several minutes.

I was hoping that the first AJAX call to see if the report was done would actually look for a while - up to a minute maybe - with checks to the DB occuring every 250 ms maybe. That way the instant (at least 250ms instant) the DB knows the report is done the response to the client happens...

If that first AJAX call did not see that the report was done - the browser would then wait a bit (1000 ms at this time) and then re-send an AJAX call to the server for status update.

This would happen over and over again until said report is completed...

It is actually working with the code I posted in that other thread. I just don't know how scaleable this is going to be.