asp.net - Polling Vs AsyncCallback callbacks - best approach for a slow web service? -


I have a webpage that uses AJAX to get search results for a page. On the server side I am asking for a web service which is very slow - from 20 seconds to 2 minutes.

As I think, my choices are either voting or for long-lasting requests.

seems to be ideal because after answering the web service the results will return and the thread will not be blocked on the server side.

Is there a better way to do this? Do you know of any issues with long-running HTTP requests in jQuery?

Update: Yes, when possible I will caching feedback from the web service. I have no control over the external web service that I ask.

We are using asyncCallbacks to poll the server, which is technically 4: 30-5 minutes And the system runs just fine.

It is noteworthy that you will not have any benefits except for this fact (performance, reaction time, etc.) that if you receive a lot of requests then the IIS worker thread bridge will not be reduced: i.e. Minutes are requested 2, we usually have 10 to 12 pending requests. Async callback will not make any difference in this case. If we get 100 requests per minute, then it means 500 - 600 pending connection, so uncorrupt one is essential. It is only about managing the thread pool.


Comments