google app engine - When to use entity groups in GAE's Datastore -
following on my earlier question regarding gae datastore entity hierarchies, i'm still confused when use entity groups.
take simple example:
- every
company
has 1 or moreemployee
entities - an
employee
cannot movedcompany
, , users deal 1company
can never seeemployee
s ofcompany
this looks case make employee
child entity of company
, practical consequences? improve scalability, hurt scalability, or have no impact? other advantages/disadvantages of using or not using entity hierarchy?
(entity groups enable transactions, assume example not need transactions).
nick stated should not make groups larger necessary, best practices writing scalable applications has discussion 1 why.
use entity groups when need transactions. in example gave, referenceproperty on employee achieve similar result.
aside transactions, entity groups can helpful because key-fetches , queries can keyed off of parent entity. however, might want consider multitenancy these types of use-cases.
ultimately large entity groups might hurt scalability, entities within entity group stored in same tablet. more stuff cram 1 entity group, more reduce amount of work can done in parallel -- needs done serially instead.
Comments
Post a Comment