Publication

New Technologies

Meet Cloud FireStore, Firebase’s More Scalable Older Brother

Firestore supports automatic scaling with no need for sharding.

James Schaefer
January 22, 2018

Since its founding, Firebase has had a profound impact on the database community, and we’ve used it ourselves here at Leverege. Firebase allows for the automatic synchronization of data across any number of connections, meaning there’s no need to poll a database service. When data is updated, all of the clients are notified of the change.

Despite this advancement, Firebase isn’t perfect and we’ve run into some issues here and there. For instance, in the case of large datasets Firebase requires sharding in order to store data and remain performant. However, this is addressed with Google’s new product Cloud FireStore, which is intended to be a more robust, full-featured version of Firebase. Here’s what we’ve learned while using it:

Cloud Firestore

One major improvement that Firestore supports over Firebase is the automatic scaling with no need for sharding. In its current state, Firebase’s performance tops out at 100,000 connections or 1,000 writes/second. It’s also recommended that Firebase be sharded into multiple databases, which significantly grows the complexity of the system.

Firestore, on the other hand, does not have this limitation, and in theory automatically scales to whatever number of connections and writes are necessary for your system. 

In addition, Firestore allows for data storage when applications go offline, even in a web environment, which can allow applications to be more fault tolerant when network connectivity is limited. Firebase is capable of this on Android and iOS clients, but only Firestore is capable of functioning offline in every environment. This simplifies code differences between platforms, and ensures that cached data can always be utilized during breaks in network connection.

Finally, Firestore features more robust transactions and querying systems than Firebase, making it more synchronized and more efficient to search. Beyond Firebase’s functionality, Firestore allows for atomic batch operations, which ensures that a group of changes take place as a single transaction. Additionally, Firestore supports shallow queries, better indexing, and filter chaining, all things that Firebase is not capable of due to its structure as a JSON tree.

The only downside to Firestore that we’ve encountered right now is that it’s in Beta, so it should be avoided in production environments. However, Firestore is a more stable, scalable, and ultimately well-thought-out database than Firebase, and is already shaping up to be a powerhouse in the database ecosystem as we move into the future.

James Schaefer

VP, Product Innovation

James's responsibilities include identifying patterns of problems that can be solved by new Leverege Platform features, designing and building those features, and helping his fellow engineers use them in applications. When he isn't heads down in a new database software or learning a new templating language, James enjoys rock climbing, hiking, and brewing beer.

View Profile

Explore More from the Publication