instant messaging over xmpp or websocket

i have the project requirement in which i want to make an instant messaging app in android/iphone and may be in future it supports voip and video chatting.

Now i have 2 choices

1) xmpp - it is application layer protocol for IM, which is almost 10 year old, and it has lot of extensions which support voip or may be video chatting, online/offline status and lot of other features. It is accepted by all big companies like whatsapp,fb,Skype etc

Also I heard that google has moved away from this protocol because of vulnerability.

2) websocket - it is tcp layer protocol which provides a full duplex communication over a single tcp connection and it's new and it was standardised by IETF in 2011.i don't know whether this protocol is mainly used for IM. but i know that it can be done as it is in tcp layer. And i didn't saw or heard any features/extensions of web socket other than the 4 methods(ie onOpen, onClose, onMessage and onError). so it means if i choose this i have to make my own methods of online/offline status(may be sending a frame in every “x” seconds/minute), voip, message delivery information and other features etc.

I am confused, which one i choose, xmpp or web socket, in terms of development, server handling cost, security, session handling management, browser support etc.

If i am wrong anything about these 2 protocols then please correct me.

THANKS IN ADVANCE


Google didn't find a vulnerability in XMPP.

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

链接地址: http://www.djcxy.com/p/94170.html

上一篇: 如何使用asmack android从Openfire获取一对一聊天记录

下一篇: 通过xmpp或websocket进行即时消息传递