Will Entity Groups be the "default" choice in Firestore Datastore mode?

Viewed 105

I'm quite new using Google Datastore and I'm trying to wrap my head around Entity Groups. Let's say I'm modeling a service with the following (example) data model:

Company - Site - Store - Section - Shelf - Product

A company can have a number of sites, each site have one or more stores, each store a number of sections, a section have shelves and on a shelf theer are products.

With plain old datastore I would consider using Entity Groups for this model, since it enables transactions and since it relieves me from managing reference properties manually etc. But I would have to consider the 1 per second write constraint, so if I e.g. expect products to be updated often I need to put them as a separate entity, or split them into two entities where I put properties that update often in the second one and keep it outside of the Entity Group.

This is my basic understanding, please let me know if this is wrong up until here.

Now, with the Firestore in Datastore mode that is coming 2021: https://cloud.google.com/datastore/docs/upgrade-to-firestore

  • Queries are no longer eventually consistent; instead, they are all strongly consistent.
  • Queries in transactions are no longer required to be ancestor queries.
  • Transactions are no longer limited to 25 entity groups.
  • Writes to an entity group are no longer limited to 1 per second.
  • Transactions now use pessimistic locks instead of optimistic concurrency

it seems to me the current limitations with Entity Groups are going away, and that I always should use Entity Groups when modeling my exampel above. Is this correct or am I missing something?

0 Answers
Related