XMPP vs HTML5 Websocket?

We are creating a site on which we are trying to develop a chat application, we have already created it using a comet, however, due to speed factors, we decided to do it in XMPP.

However, if you live and live in HTML5, as well as about new websockets technologies, should we leave XMPP and try to do this with Websockets?

So my questions are:

  • I can make a mobile application and connect it to XMPP on my server, is there a way to connect to the web chat chat application via phone? (For example, the Smack library for Android, is there something similar for website-based web applications?

  • Is there an alternative if the user uses the old browser for chat based web chat?

  • Who has the most overhead and which technology is faster or better?

In addition, you can say that XMPP is a proven technology, do you still need many libraries? For example, Strophe.js flXHR, etc. Right? But isn't HTML5 built for this type of thing without eternal libraries, etc.

Hello,

+4
source share
1 answer

The XMPP wikiipedia page contains an XMPP section over HTTP and WebSocket transports . The last paragraph says:

Perhaps a more efficient real-time messaging transport is WebSocket, a web technology that provides bi-directional full-duplex communication channels over a single TCP connection. Pilot implementations of XMPP over WebSocket exist, and an (now expired) Internet project was published in the IETF documenting this approach, but not yet standardized.

WebSocket is a messaging protocol, and such XMPP can be implemented through WebSocket. If the WebSocket sub-protocols are adopted further, we can even see the built-in support for this. But until then, the WebSocket connection will simply act as a low-level transport for XMPP messages.

So this is not a "XMPP or WebSocket" question. If XMPP is well suited to your requirements, I would look for a solution that uses WebSockets (and has appropriate HTTP rollbacks) and provides XMPP support.

+12
source

Source: https://habr.com/ru/post/1481464/


All Articles