What would be the purpose of putting all datastore entities in a single group?

前端 未结 2 1738
抹茶落季
抹茶落季 2020-12-12 06:05

I have started working on an existing project which uses Google Datastore where for some of the entity kinds every entity is assigned the same ancestor. Example:

<         


        
2条回答
  •  萌比男神i
    2020-12-12 06:33

    This was probably done to achieve strongly consistent queries within the group. As you've pointed out this design has... drawbacks.

    If this is solely reference data (i.e. Read many write once) that may mitigate some of the negatives, but also mostly invalidates the positives (i.e. Eventual consistency is not a problem if data doesn't update often).

提交回复
热议问题