简体   繁体   English

Java或C#中长轮询/ Comet的最佳选择?

[英]Best choice for Long-polling / Comet in Java or C#?

Which native server is best, in your opinion, to implement long-polling / Comet ? 在您看来,哪种本机服务器最适合实施长轮询/ 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. 我限制了C#或Java的答案,因为这两种技术在我的工作场所占主导地位。 The requirements are as usual: performance, ease of deployment/programming, customization, ... 要求与往常一样:性能,易于部署/编程,定制,......

IIS + WebSync is a very straight-forward, scalable and extensible solution for server push. IIS + WebSync是一种非常直观,可扩展且可扩展的服务器推送解决方案。 There is a free Community edition I highly recommend checking out. 有一个免费的社区版我强烈建议退房。

Both Java and .NET platforms have enough capabilities to handle your needs. Java和.NET平台都有足够的功能来满足您的需求。 If you choose Java : You may start with DWR otherwise, on the .net side PokeIn library should be the choice. 如果您选择Java:您可以从DWR开始,否则,在.net端应该是PokeIn库的选择。

I just saw this blogpost from Scott Hanselman yesterday. 我昨天刚从Scott Hanselman那里看到了这篇博文。 It looks very promising. 看起来很有希望。

http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx

It features an opensource product called SignalR which is available through nuget. 它有一个名为SignalR的开源产品,可通过nuget获得。

You can find an example chat application in the sources @ github 您可以在sources @ github中找到示例聊天应用程序

https://github.com/SignalR/SignalR https://github.com/SignalR/SignalR

Try netty-socketio project. 尝试netty-socketio项目。 It's a Java framework with long-pooling and websocket support using famous Socket.IO protocol. 它是一个Java框架,具有使用着名的Socket.IO协议的长池和websocket支持。

我不认为这方面有重大差异。

I know that special attention was paid to Comet support in the Grizzly engine used by Glassfish. 我知道Glassfish使用的Grizzly引擎对Comet的支持给予了特别的关注。 It wasn't treated as an afterthought. 它没有被视为事后的想法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM