How do modern implementations of Comet/Reverse AJAX work? Any stable C# WCF or ASP.NET implementations?

≡放荡痞女 提交于 2019-11-26 09:55:11

问题


What is the correct way (or best) way to implement Comet, HTTP Push, or Reverse AJAX?

What .NET implementations would you recommend?


回答1:


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 =).

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




回答2:


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.

There are a ton of examples in the download, and the community edition is free.




回答3:


Microsoft is developing HTTP push in SignalR

https://github.com/SignalR/SignalR



来源:https://stackoverflow.com/questions/5427681/how-do-modern-implementations-of-comet-reverse-ajax-work-any-stable-c-sharp-wcf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!