Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XMPP vs. HTML5 Websocket?

We are making a website where we are trying to develop a chat application, we have already built one using Comet, however due to speed factors we decided to make one in XMPP.

However, with HTML5 alive and living and the new websockets technology in existance, should we leave XMPP and try making using Websockets instead?

So my questions are :

  1. I can make a mobile app and connect it to XMPP on my server, is there a way to connect to a websockets based chat app via phone? ( For example Smack library for android, is there something similar for websockets based app?

  2. Is there a fallback option say if the person is using an old browser for the websockets based chat app?

  3. Which has more overhead and which technology is faster or better?

Also, it may be said that XMPP is a tried a tested technology, it still needs many libraries right? Such as the Strophe.js flXHR etc. right? But isin't HTML5 built for this type of thing without any eternal libraries etc?

Regards,

like image 1000
Sankalp Singha Avatar asked May 17 '13 20:05

Sankalp Singha


People also ask

Which is better between XMPP and WebSockets?

Even though both are useful to transmit data in real-time at blazing speed, WebSocket outperforms XMPP on this front because of its centralized nature and continual communication. XMPP force authentication and authorization of both the server and the client slows down its performance a bit.

Does WebSockets use XMPP?

WebSocket supports the implementation of more than 40 additional protocols on top of itself — XMPP, WAMP, and MQTT. You can also expand WebSocket functionality, such as providing data compression, via extensions. Being on the application layer, XMPP extensibility looks a bit different.

Is XMPP deprecated?

The XMPP functionality is no longer available and is deprecated in Skype for Business Server 2019. If you want to continue with the XMPP functionality, you can do so in a coexistence environment with a legacy version (Skype for Business Server 2015 or Lync Server 2013).

Who still uses XMPP?

Zoom uses XMPP (with some proprietary extensions) for its chat functionality. Grindr is a geosocial networking and online dating application that uses XMPP for its chat application. Mailfence uses XMPP for its group chat functionality. A free and open source XMPP service that uses your phone number as the user ID.


1 Answers

The XMPP wikipedia page has a section on XMPP via HTTP and WebSocket transports. The last paragraph states:

A perhaps more efficient transport for real-time messaging is WebSocket, a web technology providing for bi-directional, full-duplex communications channels over a single TCP connection. Experimental implementations of XMPP over WebSocket exist, and a (now-expired) Internet-Draft documenting this approach was published at the IETF but not yet standardized.

WebSocket is a protocol for messaging and as such XMPP can be implemented over WebSocket. If WebSocket sub-protocols are taken further we may even see native support for this. But until then the WebSocket connection would simply act as the low-level transport for the XMPP protocol messages.

So, it's not a question of "XMPP or WebSocket". If XMPP fits your requirements well then I'd look for an solution that uses WebSockets (and has appropriate HTTP fallbacks) and provides XMPP support.

like image 179
leggetter Avatar answered Nov 04 '22 00:11

leggetter