Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XMPP/Jabber vs Redis Pub/Sub for a Real-Time Chat Server

I built a simple chat server with Node.js & Redis Pub/Sub, acani-node on GitHub. It works fine. There are a few more things left to do, but I've figured out (in my head) how to do them. But now, I'm considering using an XMPP server instead.

Features:

  • One-to-one (unicast) messaging
  • Mass (multicast) messaging, i.e., one user sends the same message to 1,000 users
  • Custom group messaging (like Beluga)
  • Hierarchical chat rooms (PSub/Pub), e.g., if you post to the Hockey chat room, then it will also go to the Sports chat room
  • Photo & video messaging (TODO)
  • Any other cool features...

Also, I know I can deploy the Node.js server to Joyent Node, and I have a Redis server with Redis To Go.

I'm thinking I'll follow the YAGNI principle and finish with Redis Pub/Sub, esp. since we're almost done, and convert to XMPP if we see the need.

like image 662
ma11hew28 Avatar asked Oct 12 '22 07:10

ma11hew28


1 Answers

I would recommend you follow YAGNI.

Unless you expect a large amount of enhancement, new features or generally high scaling to come into play.

One other use case for XMPP might be if you want your core code to not be dependent on a particular database (redis).

like image 78
Raynos Avatar answered Nov 15 '22 13:11

Raynos