聊天室软件最好的开放协议是什么?
我正在比较 IRC、XMPP 和我拥有的第三个专有服务器。
每个的优点和缺点是什么,如果您知道任何值得一提的,请建议其他人。
I'm comparing between IRC, XMPP and a third proprietary server I have.
what are the pros and cons of each and suggest others if you know any mentionable ones.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我知道这是一篇非常老的帖子,操作员可能不会看到回复(或者甚至不再关心),但我个人会在 XMPP 上部署 IRC。造成这种情况的主要原因是随着越来越多的 XMPP 客户端连接,XMPP 服务器占用的内存量。在单个实例中,当超过大约 200 个用户连接并主动开始使用该服务(XMPP MUC、文件传输、客户端到客户端加密等)时,我还没有看到坚如磐石的可靠性。
与 IRC 相比,我个人见过单个实例有数千个连接,内存利用率通常要低 60-70%。 IRC 服务器不需要解析从客户端传递的消息,文件传输是通过 DCC 进行客户端到客户端的,并且设计比基于 XML 的 XMPP 简单得多。
如果您运行多个服务器,并允许客户端选择连接到哪个服务器,则可能会遇到网络分裂。但是不稳定的 IRC 服务器与不稳定的 XMPP 服务器有何不同?而且,如果 IRC 服务器发生网络分裂,它不会使每个客户端都脱机,只会使连接到它的客户端脱机。因此,与 XMPP 相比,影响很小(除非您正在使用 s2s)。
无论如何,IRC 协议本质上更简单,在相同的内存利用率下,可以处理比 XMPP 更多数量级的客户端连接,使用更少的线路带宽,不需要身份验证(尽管您可以添加此功能)等。
看来我不是唯一有这种感觉的人:http://web.archive.org/web/20131128110041/http://laltromondo.dynalias.net:80/~iki/informatica/soft/xmpp_vs_irc/ 。
对于本文的未来读者,请考虑 IRC。它可能只会让你以后免去一些头痛。
I know this is a very old post, and the op will likely not see the reply (or maybe even care any longer), but I would deploy IRC over XMPP personally. The big reason for this is the amount of memory that XMPP servers occupy as more and more XMPP clients connect. On a single instance, I have not seen rock-solid reliability when more than about 200 users connect, and actively start using the service (XMPP MUC, file transfers, client-to-client encryption, etc).
Contrasted with IRC, I've personally seen thousands of connections to a single instance, and the memory utilization is usually 60-70% less. The IRC server does not need to parse the messages passed from the client, file transfers are client-to-client via DCC, and the design is much, much simpler than the XML-based XMPP.
You may run into netsplits, if you run multiple servers, and allow clients to choose which server to connect to. But how is an unstable IRC server any different than an unstable XMPP server? And if an IRC server netsplits, it doesn't take every client offline- only those connected to it. So the impact is minimal, compared to XMPP (unless you're doing s2s).
Regardless, the IRC protocol is more simplistic in nature, can handle orders of magnitude more client connections than XMPP for the same memory utilization, uses less bandwidth on the wire, doesn't require authentication (although you can add this feature), etc.
It seems I'm not the only one who feels this way: http://web.archive.org/web/20131128110041/http://laltromondo.dynalias.net:80/~iki/informatica/soft/xmpp_vs_irc/.
For future readers of this post, consider IRC. It may just save you some headache later down the road.
就去 XMPP 吧。
有已知可大规模扩展的服务器,它可以轻松地与 Web 客户端一起使用(如果这就是您所需要的)优秀的库来支持它,以及 XEP-45 准确指定了客户端和服务器应该如何操作。
Just go for XMPP.
There are servers known to scale big, it can work with a web client with minimum hassle (if that's what you need) with great libraries to support it, and, the XEP-45 specifies exactly how the clients and servers are supposed to operate.
您可能需要考虑PSYC。
它就像 XMPP 和 IRC 的最佳功能的融合,还有更多:
You might want to consider PSYC.
It's like the blend of the best features of XMPP and IRC, and then some more :