Chat server with websocket + node.js versus native client with xmpp

I could not find any reasonable comparison criteria between a chat client that works using node.js chat server VS client that works with xmpp.

I know that node.js is asynchronous, and as far as I know, xmpp. However, my main concern is performance with the same number of concurrent users.

I need this information to write an Android app. I would like to know your opinions and advantages / disadvantages using both systems.

Thanks in advance.

+7
source share
3 answers

As long as I understand what you are asking, you are trying to compare the server side Javascript implementation (Node.js) with the messaging protocol (XMPP).

There are many ready-made XMPP servers and many client libraries already written. Since these are the specific things that you will work with, you should evaluate them if you plan to use XMPP and then compare them with other solutions to your problem.

If you are implementing something yourself on top of Node and web sockets, then you need to handle all the things that are already provided by XMPP, such as authentication, encryption, application protocol, etc., as well as all server routing logic. Many XMPP servers also support clustering - transparently running multiple servers under the same domain.

Ultimately, the choice is yours, as you know the most about your specific application. You must compare solutions not only with their only node performance, but also with development time and scalability among other factors.

+1
source

I have created a couple of chat services with Node.js for clients, and although I can say that it is easy to get a basic chat service with Node.js, you will probably spend a lot of time reinventing the wheel if you decide to go this route. An XMPP server, such as eJabberd, has many built-in functions that you do not have to rebuild. Authentication, multi-user chat, moderation (kick / ban / ignore), user settings, logging, etc.

For the projects I was working on, eJabberd was certainly redundant, as they only needed the basics, but you should carefully consider your use case in order to make a decision.

I'm going to create a Node.js web client for XMPP to do something similar to Campfire, but with eJabberd as its backend. I am not really going to do this, but I think that would be a good way to get the best of both worlds.

+1
source

It also depends on which client you write: browser-based clients use BOSH, which is XMPP over HTTP, which uses a long poll (similar to a comet). This creates at least one request every 30 seconds (depending on the settings) from each client, which begins to add up after you receive several thousand customers. I would be interested to see a comparison on this - it looks like web sockets should have an edge.

+1
source

All Articles