Skip to content
loading...

re: How do you scale a nodejs real-time API to concurrently serve a million users? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: XMPP server is best solution for chat. Do not use node.js as chat data streaming.
 

Could you provide some details / data on your statement. Why would you choose XMPP over a NodeJS app? Do you have any personal experience / empirical evidence the poster could use for references?

 

Yes. 8 Android app built by me use XMPP (Openfire).

I previously use Node.js but there are many limitations in node.js

1) You need to built all things from scratch but in openfire XMPP server each and every thing that i want to use is already prebuild.

2) Node.js is good for broadcasting messages. But for one-to-one messaging. It is disastrous. On the other hand Openfire provides both of these.

3) Main problem with node.js is offline messaging.

Example. When User_A send message to User_B and User_B is offline at the time of messaging. Then message lost. To solve this problem you need to code all thing for this from scratch in node.js. But in openfire you don't need to worry.

4) You need to track all users sockets. But in openfire there is no such problem.
5) You don't detect which user is online or not in node.js. You need to program it that node.js ping for every 'X' seconds to users to track their availability. But In openfire you don't need to worry.

There are many other points.

In other words You just need to install XMPP server like openfire. And Go for your project. you don't create all thing from scratch like in node.js

I have one question. Why google,facebook,whatsapp use XMPP server for instant messaging and push notification. Why they don't even try to use Node.js

Node.JS real time API is just for fun.

I use Node.js previously But I face many problem . My client complaint that they don't receive messages. Buy when i heard of XMPP server. i used that in all my apps for push notifications and for chat.

Thank you for the details. That is some very helpful information. I sure @presto412 has a better idea of the route to take now.

cubettech.com/blog/xmpp-chat-using...

How would you rate this? I'd like to keep my codebase consistent

Hey I would like to discuss this a lot further, could you follow me back or send me a mail at priyansh.jain0246@gmail.com ?

Mr. Priyansh Jain. That is node.js xmpp client not XMPP server.

I think you don't read comment section in first block of code.

first : we need an xmpp chat server

second : establish connection to the chat server

Love all the knowledge sharing in this thread. Just a friendly reminder everyone’s here to learn from each other’s experiences. 👍🏻

code of conduct - report abuse