Billy Lo

Jun 15, 2020

2 min read

Ep. 22 — Firestore vs. MongoDB+Realm (as of Jun 2020)

One stop shop?

If you are aiming at making a best-in-class mobile app, offline capabilities is a must-have. Apps like Google Photos, Spotify, Flipboard and Waze would not have been as successful if they require continuous access to the Internet.

From an architecture viewpoint, this means you need to choose an on-device datastore.

I have been a fan of Google’s Firebase suite and therefore Firestore is my default mobile database of choice.

In 2020, MongoDB has merged Realm.io with its core engine and brought the best of both worlds together. I have found the new MongoDB Realm platform increasingly appealing. The Firebase suite is nice because it has authentication, database, storage, functions, hosting, crash reporting, analytics and remote config. But…

Firestore is a fairly basic NoSQL database. Mongo/Realm combo has a few advantages over Firestore, most notably:

  1. GROUP BY and aggregate functions (min/max/sum/count/etc)

Of course, there are other mobile app database engines out there (AWS DynamoDB, Azure Cosmos DB, Parse, Couchbase, neo4j, CouchDB, etc.)

At this point in time, I like the MongoDB/Realm combo the most.