Comet/Reverse AJAX 的现代实现是如何工作的?有稳定的 C# WCF 或 ASP.NET 实现吗?

发布于 2024-10-27 08:33:34 字数 79 浏览 2 评论 0原文

实现 Comet、HTTP Push 或 Reverse AJAX 的正确(或最佳)方法是什么?

您会推荐哪些 .NET 实现?

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

What .NET implementations would you recommend?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

你没皮卡萌 2024-11-03 08:33:34

我听说过 WebSyncPokeIn,两者都是付费实现,我使用过 PokeIn,它非常简单。如果您希望编写自己的 COMET 实现代码,我只能说这是一项复杂的任务,因为您需要修改 IIS 的自然行为。这是一种绕过 HTTP 协议限制的巧妙方法,您需要非常清楚自己在做什么,这样才不会破坏周围的事物 =)。

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

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

つ低調成傷 2024-11-03 08:33:34

JOBG 的正确性在于:复杂性;这可能不是一项你愿意轻易承担的任务。我是 WebSync 的作者之一,我可以证明这是一项艰巨的任务。

下载中有大量示例,社区版是免费的。

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.

何以畏孤独 2024-11-03 08:33:34

Microsoft 正在 SignalR 中开发 HTTP 推送

https://github.com/SignalR/SignalR

Microsoft is developing HTTP push in SignalR

https://github.com/SignalR/SignalR

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文