Does Firestore in "Datastore mode" have any advantages "Native mode"

Cost.

Firestore in Datastore mode supports key-only and projection queries just like the original datastore. That means that the result set of those queries counts towards "Cloud Firestore Small Operations" which are free. We accumulate billions of those small operations per day and not having projection queries would effectively 10-fold our datastore cost which would be unbearable.

As this feature is not available in Firestore native mode - and also with the strong consistency added in - we expected it to be less performant then in the original datastore, but in our tests this was not the case. Firestore in datastore mode consistently performed about twice as fast for our application across all types of operations.


There are advantages of using "datastore mode", even for a new project.

I am evaluating the two modes of firestore "Datastore mode" and "Native mode" for a migration project from MySQL.

On one hand, I consider using the "Datastore mode" for one back-end global repository because:

  1. Server side only
  2. Strong performance expectation on search queries across all entities
  3. Query and sort on several properties altogether
  4. Structured data model with one root kind and few second level kinds
  5. A lot of write with limited transaction requirement, a huge number of read with projection within an entity group

On the other hand, the "Native mode" seems to fit some requirements for a user facing specific application because:

  1. Web, iOS, Android, API interface with bi-directional sync
  2. Several occasionally connected use cases
  3. Few large polymorphic objects to sync and to persist
  4. Mostly simple query on one properties (parent object)

Though, there is one reason which advocate for Datastore mode for the second project

  1. Multi-tenancy with namespace

There are also common needs fulfilled by both mode, which support the decision to migration to NoSQL technologies

  1. Scalability
  2. No admin
  3. Availability
  4. Speed of development

The items 2 to 5 and 10 are based on features specific for the Datastore Mode, not possible in Native Mode. The items 6 to 9 are specific to Native Mode.

Update : March, 21st 2019

Six months after the evaluation described in my first answer, my team is using both Firestore (native) mode and Datastore mode.

  • 2 projects based on Firestore. We are using a lot the concepts of collection, sub-collection and documents and the undelying segregation of data. We also have implemented listeners in iOS and Android apps for sub-collections selected accordung to strong business and security rules, which is not possible with Datastore.

  • 9 projects based on Datastore. For three 3 of them, we are are using a lot the concepts of namespace and kind. We also use the global indexing of kind's properties and the projection of properties server-side, which is not possible with Firestore.

PS: we are considering to open-source our python library for fast development of a common API running either on Firestore and on Datastore.