The Chat SDK is backend agnostic. That means that the UI can be made to support any type of messaging server. To do this, we need to provide a network adapter to allow the Chat SDK UI to communicate with the messaging server. Currently, network adapters are provided for three different backends:
The Firebase network adapter provides a full messaging experience using Firebase Realtime Database including:
Firestream is a new messaging API we've developed. Firestream is designed to be a light-weight messaging API for Firebase Realtime and Firestore. The Firestream library is stand-alone so it can be used with Chat SDK or alone.
Since Firestream doesn't provide any user management features, the Firestream network adapter for Chat SDK uses the Firebase network adapter to handle user accounts, search and presence. Then the Firestream library provides the messaging functionality
The XMPP network adapter allows Chat SDK to inteface with any XMPP server. XMPP is a standard messaging protocol which powers some of the biggest messaging apps in the world including: WhatsApp, Skype, Messenger. Chat SDK is compatible with a wide range of open-source XMPP servers including: ejabberd, OpenFire, Prosody, Tigase, MongooseIM.
Each of these options has strengths and weaknesses. There isn't any one that's the best but each may be better in a certain situation.
I'll start by talking about XMPP because it has some special properties. I would recommend using XMPP for the following cases;
The downside of XMPP is that the server setup and maintenance is more complicated.
In general, if you have any of the above requirements, I would recommend XMPP. If not, then the decision is between Firebase and Firestream.
Firestream has two main advantages at the moment. Firstly, Firestream has a light-weight API for JavaScript and Node.js. That makes it ideal if you need to add in chat bots or link the chat to an existing backend server.
The second advantage is that Firestore can scale much further than Firebase Realtime. If you have your own user-management system, then you could just user Chat SDK and Firestream for the messaging part of your app allowing it to scale to a much higher number of concurrent users.
If you have an app with fewer than 10 million monthly users that mainly targets iOS and Android and want a library that's fully featured and easy to setup and run. I would recommend the Firebase backend.