Developing a mobile chat room, backend use XMPP or WebSocket?

前端 未结 1 1669
离开以前
离开以前 2021-01-28 06:41

Some requirements for a mobile chat room:

  1. Should be able to work seamlessly with client\'s frequent connect/disconnect due to the mobile network

相关标签:
1条回答
  • 2021-01-28 07:09

    You are kind of asking how can I get to my destination, should I drive my car, or take the railroad tracks. If you go with the railroad tracks, you still have to build your train.

    XMPP is primarily used for chat and excels in that space. Websockets is much more similar to BOSH in XMPP, an extension to allow two way communications over HTTP. Websockets is just a connection protocol, as opposed to a realtime messaging protocol that actually supports the concept of chat. I would speculate that in the future, there will an extension added to XMPP to support Websockets, as it is a natural fit.

    Not saying that you can't use Websockets, just that you will still have to build the 'chat' protocol on top of it, as opposed to using an existing one with many servers readily available.

    0 讨论(0)
提交回复
热议问题