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 more employee entities
  • an employee cannot moved company, , users deal 1 company can never see employees of company

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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -