How to choose between Firebase and CometChat Pro for Your Chat Apps
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: