What is the correct way (or best) way to implement Comet, HTTP Push, or Reverse AJAX?
实现Comet,HTTP Push或Reverse AJAX的正确方法(或最佳方式)是什么?
What .NET implementations would you recommend?
你会推荐什么.NET实现?
3 个解决方案
#1
3
I have hear about, WebSync and PokeIn, both are paid implementations, I have used PokeIn and its pretty straight forward. If you are looking forward to code your own COMET implementation, I just can say that its a complex task, because you need to modify the natural behaviour if IIS. Its a hacky way to get around the limitations of the HTTP protocol and you need to know really well what you doing so don't end up breaking things around =).
我听说过,WebSync和PokeIn都是付费实现,我使用过PokeIn,而且很直接。如果您期待编写自己的COMET实现代码,我可以说它是一个复杂的任务,因为如果IIS需要修改自然行为。它是一种克服HTTP协议限制的hacky方法,你需要非常清楚你在做什么,所以最终不要破坏=)。
It's also known as long-lived requests. This is also by far the most complex method to implement. Basically, a request is made by the client, and the server very slowly responds, which causes the connection to be maintained. Periodically, when the server has something to push, it'll "burst" send the information, so to speak. This approach gives you real-time push, which is great. But, it has a serious down-side: holding connections open like that isn't how the underlying protocols are meant to work, and most servers aren't terribly happy about it. If your traffic gets too great, you'll chew up threads on the server and wind up bringing your site down. ref: http://www.coderanch.com/t/121668/HTML-JavaScript/does-Reverse-Ajax-Works
它也被称为长期请求。这也是迄今为止最复杂的实现方法。基本上,客户端发出请求,服务器响应非常慢,这会导致连接得以维持。定期地,当服务器有推送的东西时,它会“突然”发送信息,可以这么说。这种方法为您提供实时推送,这很棒。但是,它有一个严重的缺点:保持连接打开,这不是底层协议的工作方式,大多数服务器对此并不十分满意。如果您的流量太大,您将在服务器上咀嚼线程,最终导致您的网站崩溃。参考:http://www.coderanch.com/t/121668/HTML-JavaScript/does-Reverse-Ajax-Works
#2
3
JOBG is correct re: the complexities; it's probably not a task you want to undertake lightly. I'm one of the authors of WebSync, and I can attest that it's a difficult task.
JOBG是正确的:复杂性;这可能不是你想要轻松承担的任务。我是WebSync的作者之一,我可以证明这是一项艰巨的任务。
There are a ton of examples in the download, and the community edition is free.
下载中有大量示例,社区版是免费的。
#3
1
Microsoft is developing HTTP push in SignalR
微软正在开发SignalR中的HTTP推送
#1
3
I have hear about, WebSync and PokeIn, both are paid implementations, I have used PokeIn and its pretty straight forward. If you are looking forward to code your own COMET implementation, I just can say that its a complex task, because you need to modify the natural behaviour if IIS. Its a hacky way to get around the limitations of the HTTP protocol and you need to know really well what you doing so don't end up breaking things around =).
我听说过,WebSync和PokeIn都是付费实现,我使用过PokeIn,而且很直接。如果您期待编写自己的COMET实现代码,我可以说它是一个复杂的任务,因为如果IIS需要修改自然行为。它是一种克服HTTP协议限制的hacky方法,你需要非常清楚你在做什么,所以最终不要破坏=)。
It's also known as long-lived requests. This is also by far the most complex method to implement. Basically, a request is made by the client, and the server very slowly responds, which causes the connection to be maintained. Periodically, when the server has something to push, it'll "burst" send the information, so to speak. This approach gives you real-time push, which is great. But, it has a serious down-side: holding connections open like that isn't how the underlying protocols are meant to work, and most servers aren't terribly happy about it. If your traffic gets too great, you'll chew up threads on the server and wind up bringing your site down. ref: http://www.coderanch.com/t/121668/HTML-JavaScript/does-Reverse-Ajax-Works
它也被称为长期请求。这也是迄今为止最复杂的实现方法。基本上,客户端发出请求,服务器响应非常慢,这会导致连接得以维持。定期地,当服务器有推送的东西时,它会“突然”发送信息,可以这么说。这种方法为您提供实时推送,这很棒。但是,它有一个严重的缺点:保持连接打开,这不是底层协议的工作方式,大多数服务器对此并不十分满意。如果您的流量太大,您将在服务器上咀嚼线程,最终导致您的网站崩溃。参考:http://www.coderanch.com/t/121668/HTML-JavaScript/does-Reverse-Ajax-Works
#2
3
JOBG is correct re: the complexities; it's probably not a task you want to undertake lightly. I'm one of the authors of WebSync, and I can attest that it's a difficult task.
JOBG是正确的:复杂性;这可能不是你想要轻松承担的任务。我是WebSync的作者之一,我可以证明这是一项艰巨的任务。
There are a ton of examples in the download, and the community edition is free.
下载中有大量示例,社区版是免费的。
#3
1
Microsoft is developing HTTP push in SignalR
微软正在开发SignalR中的HTTP推送