Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's the best open protocol for chat room software?

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.

like image 550
Bassel Alkhateeb Avatar asked Nov 10 '10 21:11

Bassel Alkhateeb


People also ask

Do chat applications use Websockets?

While originally designed to facilitate the communication between a server and browser, WebSocket can be (and widely are) used in mobile apps. Both XMPP and WebSocket are instant messaging protocols that can be used in chat apps to relay data back and forth.

Which protocol TCP or UDP is better for instant messages?

(The short answer is "use TCP" ... but it is worth thinking through the design implications for yourself.) Show activity on this post. TCP would give you reliability, which is certainly desirable when during instant messaging -- you would not want messages to be dropped during converstation.


1 Answers

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.

like image 107
Aaron Toponce Avatar answered Sep 19 '22 15:09

Aaron Toponce