Overcome Firestore’s Limitations by Migrating to MongoDB

Presenting a breakdown of the NoSQL cloud database Firestore: its limitations and our expertise in migration from Firestore to MongoDB.

February 17, 2023 | Migration | Feature Highlight

Overcome Firestore’s Limitations by Migrating to MongoDB

Cloud Firestore is a flexible, NoSQL database for mobile, web, and server development. Amidst all its glory, Firestore has some notable shortcomings.

For starters, Firestore has a limit of one instance per project, several query limitations, and provides no straightforward way of cleaning up data spread over multiple collections.

This article highlights certain shortcomings of Firestore and our expert take on migrating from Firestore to MongoDB.

Dissecting the Pitfalls of Firestore

Firestore uses the NoSQL data model to store and sync data for client-and-server-side development. It syncs data in documents across client apps through real-time updates. The documents support many different data types and are further organized into collections. You can also create subcollections within documents and build hierarchical data structures.

While Firestore provides no-maintenance massive scalability, there are some significant pitfalls:

  • Problems with aggregation queries

    An aggregation query processes data from multiple index entries to return a single summary value. Firestore supports the count() aggregation query that allows you to determine the number of documents in a collection or query. These queries rely on the existing index configuration and scale proportionally to the scanned index entries. This translates to a read of each matching row of the query and hinders efficient scaling.

  • Tricky latency and slow write frequency

    Firestone’s limits on writes and transactions can significantly hamper scaling under load. The maximum sustained write rate to a document is 1 per second, which is quite long as per the industry standard. While this latency may be feasible during the inception, it can progressively burden as writes begin to fail at higher sustained rates.

  • Full-text search

    Firestore doesn’t support native indexing or search for text fields in documents. Consequently, you need to rely on extensions to perform a full-text search (like searching for posts that contain a specific string).

    The Cloud Firestore documentation suggests using Algolia - a dedicated third-party search service. However, this alternative creates the problem of syncing data across two databases, making it challenging to maintain document integrity.

  • Data Integrity and Security

    Firestore doesn’t guarantee data integrity because it has very dynamic data structures similar to JSON. Therefore, developers cannot constrain data on the database level or set restrictions such as "only certain fields can be viewed" within a single data collection. As a result, bugs are inevitable and can lead to a data compromise.

  • ...

    Related Posts

    What Our
    Clients Are
    Constrained with time and budget, we were in search of an experienced technology partner who could navigate through the migration work quickly and effectively. With D3V, we found the right experts who exceeded our expectations and got the job done in no time.
    We used D3V to help us launch our app. They built the front end using React and then pushed to native versions of iOS and Android. Our backend was using AWS and Google Firebase for messaging. They were knowledgeable, experienced, and efficient. We will continue to use them in the future and have recommended their services to others looking for outside guidance.
    We had an idea and D3V nailed it. Other vendors that we had worked with did not understand what we were trying to do - which was not the case with D3V. They worked with us through weekly meetings to create what is now the fastest and most accurate steel estimating software in the world. Could not have asked for anything better - what a Team!
    Working with D3V was hands down one of the best experiences we’ve had with a vendor. After partnering, we realized right away how they differ from other development teams. They are genuinely interested in our business to understand what unique tech needs we have and how they can help us improve.
    Our experience with D3V was fantastic. Their team was a pleasure to work with, very knowledgeable, and explained everything to us very clearly and concisely. We are very happy with the outcome of this project!
    Protecting our customers data & providing seamless service to our customers was our top priority, which came at a cost. We are very satisfied with the cost savings & operational efficiency that D3V has achieved by optimizing our current setup. We’re excited about future opportunities for improvements through deriving insights from our 400 million biomechanics data points.
    Bedrock Real Property Services Founder

    Dr. A. Ason Okoruwa

    President, Bedrock Real Property Services


    David Brotton

    CEO & Founder, Squirrelit

    FabSystems Inc

    Terry Thornberg

    CEO, Fabsystems Inc.

    BLI Rentals

    Lee Zimbelman

    IT Director, BLI Rentals

    Osmix Music

    Jared Forman

    CEO & Co-Founder, OSMix Music

    Dari Motion

    Ryan Moodie

    Founder, DARI Motion

    Schedule a call

    Book a free technical consultation
    with a certified expert.

    Schedule Call

    Get an estimate

    Fill out our form to hear back with a project's cost estimate. No meeting required.

    Get Estimate

    Get in touch

    Send a message to D3V team.

    Let's Talk