How to choose between Firebase and CometChat Pro for Your Chat Apps

Wajahat Karim
AndroidPub
Published in
6 min readDec 10, 2019

--

This story was originally published with collaboration with CometChat Pro, and Alex Booker on their blog.

Building rich messaging for your app might seem simple at first, but things can quickly escalate when you start to think about advanced features, edge-cases, and how to manage your chat infrastructure at scale. To overcome these challenges, you have several solutions available, but how do they compare?

In this article, I will compare Firebase, a general-purpose app development platform, to CometChat Pro, which is built specifically to help you build chat.

Firebase

Firebase evolved from a tool named “Envolve,” which, interestingly enough, was built specifically to help developers code chat. Since then, Firebase has pivoted from a chat-specific tool to become a general-purpose development platform, comprised of numerous products, including a real-time database called Cloud FireStore. These generic Firebase products are “good at everything” but not great.

In short, to build chat with Firebase, you need to define a FireStore database structure. When someone sends a message, you then create a database record and, being a real-time database, FireStore broadcasts an event to all subscribers in real-time. Here is an example message structure:

--

--

Wajahat Karim
AndroidPub

🔥 Google Dev Expert (GDE) in Android . 📱 Android Dev . 💻FOSS Contributor . 📝 Tech Writer . 🎤 Public Speaker — 🌐Subscribe at https://wajahatkarim.com