Java 或 C# 中长轮询/Comet 的最佳选择?
您认为哪种本机服务器最适合实现长轮询 / Comet ?第一个目标应用程序是聊天,但还会有其他实现 - 我们基本上需要推送到客户端的功能。
我将答案限制为 C# 或 Java,因为这两种技术在我的工作场所占主导地位。要求与往常一样:性能、易于部署/编程、定制,...
Which native server is best, in your opinion, to implement long-polling / Comet? The first target application is chat, but there will be other implementations - we basically need push-to-client capabilities.
I'm limiting the answers to C# or Java because these two technologies are dominant at my workplace. The requirements are as usual: performance, ease of deployment/programming, customization, ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
IIS + WebSync 是一个非常直接、可伸缩且可扩展的服务器推送解决方案。我强烈建议您查看一个免费的社区版本。
IIS + WebSync is a very straight-forward, scalable and extensible solution for server push. There is a free Community edition I highly recommend checking out.
Java 和 .NET 平台都有足够的功能来满足您的需求。如果您选择 Java :您可以从 DWR 开始,否则,在 .net 方面 PokeIn 库应该是选择。
Both Java and .NET platforms have enough capabilities to handle your needs. If you choose Java : You may start with DWR otherwise, on the .net side PokeIn library should be the choice.
我昨天刚看到斯科特·汉塞尔曼的这篇博文。看起来很有前途。
它
具有开源名为 SignalR 的产品可通过 nuget 获得。
您可以在来源@ github
https://github.com/SignalR/SignalR中找到示例聊天应用程序
I just saw this blogpost from Scott Hanselman yesterday. It looks very promising.
http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx
It features an opensource product called SignalR which is available through nuget.
You can find an example chat application in the sources @ github
https://github.com/SignalR/SignalR
我认为在这方面没有显着差异。
I don't think there's a significant difference in this regard.
尝试 netty-socketio 项目。它是一个 Java 框架,使用著名的 Socket.IO 协议提供长池化和 websocket 支持。
Try netty-socketio project. It's a Java framework with long-pooling and websocket support using famous Socket.IO protocol.
我知道 Glassfish 使用的 Grizzly 引擎特别关注 Comet 支持。它没有被视为事后的想法。
I know that special attention was paid to Comet support in the Grizzly engine used by Glassfish. It wasn't treated as an afterthought.