Instant messaging via xmpp or websocket

I have a project requirement in which I want to create an instant messenger application in android / iphone and maybe in the future it will support voice and video chats.

I now have 2 options

1) xmpp is an application layer protocol for IM, which is almost 10 years old, and it has many extensions that support voip or can be video chats, online status and offline status, and many other functions. It is accepted by all major companies such as whatsapp, fb, Skype, etc.

I also heard that google has removed from this protocol due to a vulnerability.

2) websocket is a tcp layer protocol that provides full duplex communication over a single tcp connection and its new one, and it was standardized by the IETF in 2011. I do not know if this protocol is mainly used for IM. but I know that this can be done, as in the tcp layer. And I did not see or did not hear any functions / extensions of the web socket other than 4 methods (for example, onOpen, onClose, onMessage and onError). so this means that if I choose this, I need to make my own methods for online / offline status (maybe sending a frame every "x" seconds / minute), voip, message delivery information and other functions, etc. .

I am confused about what I choose, xmpp or web socket, in terms of design, server processing costs, security, session processing management, browser support, etc.

If I am wrong about these two protocols, please correct me.

THANKS IN EXTENSION

+4
source share
1 answer

Google did not find a vulnerability in XMPP.

You can use XMPP through WebSockets using draft-ietf-xmpp-websocket , which will soon become an RFC.

+6
source

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


All Articles