氮计划 COMET
Nitrogen Project 的 COMET 在稳定性和可容纳的开放连接数量方面可以与 ejabberd 的 xmpp 相媲美吗?我有兴趣看看氮气可以承受多少负载。如果有人有任何这方面的数据愿意分享,我将不胜感激。
Would Nitrogen Project's COMET be comparable to ejabberd's xmpp in stability and amount of open connections it can hold? I'm interested in seeing how much of a load Nitrogen can hold. If anyone has any data on this they'd like to share I'd greatly appreciate it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对 Nitrogen 的 COMET 实现了解不多,但 ejabberd XMPP comet 实现通过名为 BOSH 的协议工作,该协议基本上包装了 XMPP 内容,为 HTTP 提供一些状态。
BOSH 有许多有趣的方面,最终可能会让大量连接变得有些烦人:它一次只能支持每个用户一个活动连接(由于某种散列方案来确保 XMPP 所需的消息排序),除非您尝试包装协议在其他东西中,此时您将只需编写自己的 COMET 内容。
因此,除非您确实需要 XMPP,否则从长远来看,使用任何其他实现可能会更好。如果您确实需要 XMPP,我相信差异将很小,并且您最终可能会自己编写类似 BOSH 的协议。
请注意,可以保留多少个连接还取决于您自己的应用程序将在服务器上执行的操作,而不仅仅是套接字处理。
I do not know much about Nitrogen's COMET implementation, but the ejabberd XMPP comet implementation works over a protocol named BOSH, which basically wraps around XMPP stuff to give some state to HTTP.
BOSH has many interesting aspects that can end up making it somewhat annoying for lots of connections: it can only support one active connection per user at once (due to some hashing scheme to ensure message ordering required by XMPP), unless you try and wrap the protocol in something else, at which point you'll just be writing your own COMET stuff.
So unless you do need XMPP, going with any other implementation might be better in the long run. If you do need XMPP, I believe the difference will be minimal and that you might end up writing a BOSH-like protocol yourself.
Note that how many connections can be held will also depend on what your own application will do on the server, not just the socket handling.