Interrogate a database from a web page? - ASP.NET

Here is what I am trying to do. I have a website that allows users to queue requests that are queued in the table of jobs that the service receives and processes. I have a status column in the table that indicates whether the request will be queued for processing or for current processing by this service, or if the service has completed processing the request. The whole process takes several minutes.

I have an ASP.NET Status page in which I will need to show the current status of their request in real time. I want to show some kind of animation and indicate the current status. One way I could do this is to update meta-HTTP every x seconds, which checks the status of the request (I think sites like Expedia, Priceline do this?)

I would like to prevent a full page refresh and find an AJAX / JQuery solution. How to implement this? Poll the right approach?

+5
source share
4 answers

, , , , - ...

, , . , ... "" , .

0

, " ", Comet.

The idea is that you are making an async Ajax request from the client. On the server side, you defer the request until any status changes (so that it has something new for the report). Then you release the request and it returns the updated information.

This has the advantage over pure polling in that queries are returned only when something has changed. It may also look more responsive since it is heavily dependent on the server side.

0
source

All Articles