开发者

Very long running XmlHttpRequest

开发者 https://www.devze.com 2023-01-07 08:48 出处:网络
I am writing an application which needs \"near real-time\" updates from a browser app.The other requirement is that it use as little as possible bandwidth (so polling is not an attractive option).My i

I am writing an application which needs "near real-time" updates from a browser app. The other requirement is that it use as little as possible bandwidth (so polling is not an attractive option). My idea is to use an XmlHttpRequest and just let the server wait to respond to that request until there is something to send back. This could be anywhere from seconds to 8-12 hours.

Questions:

  1. Is an XmlHttpRequest going to wait that long for a response?
  2. Is my ASP.NET MVC service (hosted under IIS7) going to allow a request to sit that long?
  3. What would be the maximum number of users a server could support under this configuration? Are we going to run out of threads in the thread pool before we get a reasonable number of people with open requests?
  4. Is there开发者_如何学Python a better way to fill these requirements?


Take a look at Comet implementation for ASP.NET? and see if that will help you. A common example for using comet is web based chat applications, which has a similar requirement to your "seconds to 8-12 hours" statement.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号