Reputation: 4546
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 :
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?
Is there a fallback option say if the person is using an old browser for the websockets based chat app?
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,
Upvotes: 5
Views: 7264
Reputation: 15467
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.
Upvotes: 13