Hi David On Wed, Jan 28, 2009 at 1:22 AM, iDavid <idavidst...@gmail.com> wrote:
> > I got the contention errors, during my first run, using a > ReferenceProperty to link a Note to a Device (not a parent). Only > after I watched Brett's presentation did I add the device group entity > and parent=device code. > that is very weird and we should investigate better. > > Adding the device group entity and parent=device code, seems to have > solved the "too much contention for these entities" problem. > > Quote From 'Keys and Entity Groups': > > http://code.google.com/appengine/docs/python/datastore/keysandentitygroups.html#Entity_Groups_Ancestors_and_Paths > "The more entity groups your application has—that is, the more root > entities there are—the more efficiently the datastore can distribute > the entity groups across datastore nodes." > that is true.... and is true that if you do not specify a parent, then the entity is a root and therefore it is an entity group for it self ! ("An entity without a parent is a *root* entity.") from the same official document it is clear that every entity is an entity group. What you can do is to increase the "family" size adding entitities to a group (using the parent keyword) but tjhat is usefull ONLY if you need transaction... "The more entity groups your application has—that is, the more ROOT ENTITIES there are—the more efficiently the datastore can distribute the entity groups across datastore nodes" from the same paper: "An entity without a parent is a *root* entity." > > Brett does a great job of describing this in his presentation: > > http://sites.google.com/site/io/building-scalable-web-applications-with-google-app-engine > yes.. I think that what he meant is that if you use entity groups (because you need transaction) then you must know that you have to use as many entity groups as possible... as each transaction operation is done serially... so keep your entity group small and use as many as you can... the more is better... and if you do NOT use the keyword "parent" then any entity IS an entity group for it self (as it is a ROOT): that is the maximum number of entity groups that you can have ! We need to investigate why you were getting those errors even if any entity was an entity group for it self. regards --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---