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:
Supports Android and iOS
Uses Firebase Realtime database
Max 200k concurrent users
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
User Accounts (Provided by Firebase Network Adapter)
User Search (Provided by Firebase Network Adapter)
Presence (Provided by Firebase Network Adapter)
Groups / Moderation
Uses Firebase Realtime database for user accounts, search and presence
Uses Firebase Realtime or Firestore for messaging
Max 200k concurrent users (2m for Firestore)
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.
Multi-user chat / Moderation
Supports Android and iOS
Max 2 million concurrent users per node
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;
You need your app to scale massively. XMPP can support over 50 million monthly users per node.
You need to operate without an internet connection. i.e. over an intranet. XMPP doesn't require an internet connection to function
You want to operate in mainland China. Google services aren't available in China and you can easily host your XMPP server in a Chinese datacenter.
You need to self-host for data sensitivity reasons or because of data regulations
You need to interface with an existing XMPP network.
You have server skills and want to save money on hosting. XMPP will work out cheaper than Firebase
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.
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.