For a chat application data delivery to clients (end-user devices) in real time is a crucial aspect. Several protocols and systems have been developed to provide the functionality over various layers in the OSI (Open System Interconnections) model. While developing our in house models for chat’s real time component we leveraged Google’s Firebase. As the system grew complex with more layers of functionality to be added like presence detection, delivery reports etc, we tried to look for a more tailor made solution for chat and real time. This document presents the options explored and choices made.
XMPP (eXtensible Messaging and Presence Protocol), a set of open technologies for instant messaging, presence, multi-party chat, voice and video calls, collaboration, lightweight middleware, content syndication, and generalised routing of XML data.
XMPP was originally developed in the Jabber open-source community to provide an open, decentralised alternative to the closed instant messaging services at that time providing features over and above the existing ones,
WebSocket enables bidirectional, full-duplex communication between client and server over a persistent, single-socket connection. The intent is to provide what is essentially an as-close-to-raw-as-possible TCP communication layer to web application developers.
The WebSocket has broad applicability. We can use it for different purposes, such as streaming data between backend services, or connecting a backend with a frontend via long-lasting, full-duplex connections. In a nutshell, WebSockets are an excellent choice for architecting event-driven systems and building realtime apps and services where it’s essential for data to be delivered immediately.
We can broadly group WebSocket use cases into two distinct categories:
And here are some of the main benefits of using WebSockets:
LikeMinds is a chat and Feed SDK product. We wanted to introduce components which adhere to our requirements i.e. ease of setup and scale, extensibility and flexibility to stack new features. While XMPP is an application layer protocol designed for chat requiring a transport for delivery of payloads over the network such as TCP/IP, HTTP or even WebSockets, WebSockets enable a close-to-raw TCP communication.
We did a comparison between the two protocols to find the best fit for our use cases and compared the richness and powerful features offered by the two and know restrictions to make an informed choice.
Based on the comparison, both seems a strong choice with their own powerful features and limitations combined to deploy a real time chat application. We need to decide on our own criteria and considerations and do a POC to make a decision.
We made a list of considerations applicable wrt to our current requirements, scope of features and future spec and scale path to compare the two. The consideration objectives and how XMPP and WebSockets response to those objective is listed below
We did a POC on XMPP using ejabberd server setup which is an Erlang implementation in jabber protocol for chat application and presence
We did a POC on WebSockets by developing small micro service with aim to replace real time delivery of chat message data from Google Firebase to our own WebSocket based implementation in Go.
We went ahead with WebSockets based implementation for its speed (reduced latency), performance, high concurrency, and dataintegrity. We were able to design and add new features like delivery reports, presence (in progress, design ready), typing indicators (inprogress, design ready) with relative ease and complete control over tailored requirements. We plan to migrated existing and add newfeatures from chat and feed both over the WebSockets.
Deploy customised features on top of chat and feed in 15 minutes using LikeMinds SDK.
Schedule a demo!Get a front row seat to everything happening at LikeMinds including some curated expert insights each week, delivered straight to your inbox.
We promise to not spam. 🤝🏻
For a chat application data delivery to clients (end-user devices) in real time is a crucial aspect. Several protocols and systems have been developed to provide the functionality over various layers in the OSI (Open System Interconnections) model. While developing our in house models for chat’s real time component we leveraged Google’s Firebase. As the system grew complex with more layers of functionality to be added like presence detection, delivery reports etc, we tried to look for a more tailor made solution for chat and real time. This document presents the options explored and choices made.
XMPP (eXtensible Messaging and Presence Protocol), a set of open technologies for instant messaging, presence, multi-party chat, voice and video calls, collaboration, lightweight middleware, content syndication, and generalised routing of XML data.
XMPP was originally developed in the Jabber open-source community to provide an open, decentralised alternative to the closed instant messaging services at that time providing features over and above the existing ones,
WebSocket enables bidirectional, full-duplex communication between client and server over a persistent, single-socket connection. The intent is to provide what is essentially an as-close-to-raw-as-possible TCP communication layer to web application developers.
The WebSocket has broad applicability. We can use it for different purposes, such as streaming data between backend services, or connecting a backend with a frontend via long-lasting, full-duplex connections. In a nutshell, WebSockets are an excellent choice for architecting event-driven systems and building realtime apps and services where it’s essential for data to be delivered immediately.
We can broadly group WebSocket use cases into two distinct categories:
And here are some of the main benefits of using WebSockets:
LikeMinds is a chat and Feed SDK product. We wanted to introduce components which adhere to our requirements i.e. ease of setup and scale, extensibility and flexibility to stack new features. While XMPP is an application layer protocol designed for chat requiring a transport for delivery of payloads over the network such as TCP/IP, HTTP or even WebSockets, WebSockets enable a close-to-raw TCP communication.
We did a comparison between the two protocols to find the best fit for our use cases and compared the richness and powerful features offered by the two and know restrictions to make an informed choice.
Based on the comparison, both seems a strong choice with their own powerful features and limitations combined to deploy a real time chat application. We need to decide on our own criteria and considerations and do a POC to make a decision.
We made a list of considerations applicable wrt to our current requirements, scope of features and future spec and scale path to compare the two. The consideration objectives and how XMPP and WebSockets response to those objective is listed below
We did a POC on XMPP using ejabberd server setup which is an Erlang implementation in jabber protocol for chat application and presence
We did a POC on WebSockets by developing small micro service with aim to replace real time delivery of chat message data from Google Firebase to our own WebSocket based implementation in Go.
We went ahead with WebSockets based implementation for its speed (reduced latency), performance, high concurrency, and dataintegrity. We were able to design and add new features like delivery reports, presence (in progress, design ready), typing indicators (inprogress, design ready) with relative ease and complete control over tailored requirements. We plan to migrated existing and add newfeatures from chat and feed both over the WebSockets.
Deploy customised features on top of chat and feed in 15 minutes using LikeMinds SDK.
Let's start!