Comet/Reverse AJAX 的现代实现如何工作?任何稳定的 C# WCF 或 ASP.NET 实现? [英] How do modern implementations of Comet/Reverse AJAX work? Any stable C# WCF or ASP.NET implementations?

查看:17
本文介绍了Comet/Reverse AJAX 的现代实现如何工作?任何稳定的 C# WCF 或 ASP.NET 实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实现 Comet、HTTP 推送或反向 AJAX 的正确(或最佳)方法是什么?

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

您会推荐哪些 .NET 实现?

What .NET implementations would you recommend?

推荐答案

我听说过,WebSyncPokeIn,两者都是付费实现,我使用过 PokeIn 并且非常简单.如果您期待编写自己的 COMET 实现代码,我只能说这是一项复杂的任务,因为您需要修改 IIS 的自然行为.这是绕过 HTTP 协议限制的一种黑客方法,您需要非常清楚自己在做什么,否则最终不会破坏周围的事物 =).

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

它也被称为长寿要求.这也是迄今为止最实现方法复杂.基本上,请求是由客户端和服务器非常响应,这会导致连接要维护.定期,当服务器有东西要推送,它会爆发"发送信息,所以说话.这种方法给你实时推送,很棒.但,它有一个严重的缺点:持有连接不是这样打开的底层协议旨在工作,而且大多数服务器都不是很糟糕很高兴.如果您的流量得到太棒了,你会咬断线程服务器并最终带来您的网站关闭.参考:http://www.coderanch.com/t/121668/HTML-JavaScript/does-Reverse-Ajax-Works

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

这篇关于Comet/Reverse AJAX 的现代实现如何工作?任何稳定的 C# WCF 或 ASP.NET 实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆