[google-appengine] Re: Entity groups

2017-01-13 Thread 'Alex (Cloud Platform Support)' via Google App Engine
Hi Louise, You’re right, as stated per the Transactions and Entity Groups documentation , there is a 25 entity groups limit for a single data transaction. However, according to your description this

[google-appengine] Re: Entity groups

2017-01-16 Thread Louise Elmose Hedegaard
Hi Alex, Thank you for answering. Here's how I create the entities: Entity shopEntity = new Entity(ShopDBFields.SHOP_TABLE_NAME); shopEntity.setProperty(ShopDBFields.CREATED, new Date()); datastore.put(shopEntity); Entity productEntity = new Entity(ProductDBFields.PRODUCT_TABLE_NAME, K

[google-appengine] Re: Entity groups

2017-01-16 Thread Louise Elmose Hedegaard
My application obviously does not agree that I have only one entity group. When I try to insert more than 25 products, I get the error "operating on too many entity groups in a single transaction.". When I do not define a XG transaction, I get the error "java.lang.IllegalArgumentException: cross

[google-appengine] Re: Entity groups

2017-01-16 Thread Louise Elmose Hedegaard
Maybe I figured it out myself. I assumed that definition of parent entity was transitive, i.e. if the parent of an image is a product and the parent of the product is a shop, then shop is ancestor of image, but that is not the case. So instead of: Entity variantEntity = new Entity(VariantDBField

[google-appengine] Re: Entity groups

2017-01-17 Thread 'Alex (Cloud Platform Support)' via Google App Engine
Thanks for posting your code sample and your solution. In fact you got it right, Datastore Entity ancestor paths [1] are designed to allow entities to optionally be assigned parents. Meaning that upon creation of a datastore entity, the ancestor path of this entity has to be specified explici

[google-appengine] Re: entity groups

2009-08-27 Thread djidjadji
To get the parent-child relation: specify the parent= attribute of the object constructor for the child. All the links/relations are stored in the Key of the object, you don't have to put any Properties in the Model definition. myObj = Model(parent=someparent,.) myObj.put() If you want to fi

[google-appengine] Re: entity groups

2009-08-27 Thread Laimonas Simutis
OK, I will give that a shot. Thanks for the clarification. On Thu, Aug 27, 2009 at 3:40 PM, djidjadji wrote: > > To get the parent-child relation: specify the parent= attribute of the > object constructor for the child. All the links/relations are stored > in the Key of the object, you don't hav

[google-appengine] Re: entity groups

2009-08-28 Thread Tim Hoffman
On thing to remember with parent/entity groups and that is your can't change them after the fact. So if you ever want to move an entity between objects (ie parents swapping children) you would then want to use reference properties (child -> parent) or hold a list of keys in the parent of the child

[google-appengine] Re: Entity Groups

2009-02-10 Thread David Symonds
On Tue, Feb 10, 2009 at 11:03 AM, Ian Lewis wrote: > The documentation seemed to suggest that the more root entities you have the > more it can distribute your query so it should be faster, but I'm curious > about entity groups and what, if any, advantage there is to putting entities > in an ent

[google-appengine] Re: Entity Groups

2009-02-10 Thread gops
Is there any tutorial on this for a newbie ? .. does just having a reference property is enough or do we need to recode things specifically ? .. On Feb 10, 12:59 pm, David Symonds wrote: > On Tue, Feb 10, 2009 at 1d1:03 AM, Ian Lewis wrote: > > The documentation seemed to suggest that the more

[google-appengine] Re: Entity Groups

2009-02-10 Thread Big Stu
> It also benefits from locality. Entity groups are stored close > together (needed to make transactions fast), which is why lots of > small entity groups makes the overall application faster (because they > can be spread out). If you do a bunch of processing on groups of > entities in a single re

[google-appengine] Re: Entity Groups

2009-02-10 Thread Michael Hart
Not quite right - I think the "faster" property refers to the fact that reads/writes can happen in parallel (because they're split over multiple machines), not because of the actual geographical location of the servers (not that this wouldn't help as well, but I don't believe GAE currently

[google-appengine] Re: Entity Groups

2009-02-11 Thread mcobrien
I'm not sure how much locality helps, but putting entities in a group for performance sounds like it could go wrong, depending on your data. Writes to entities within a group are serialized so having too many within in a single group can seriously hurt performance. The API doc has some good hints

[google-appengine] Re: Entity Groups

2009-02-11 Thread Michael Hart
Hmm? I think Stu was asking about Dave's reference to locality, assuming that it was for geographical purposes - I was just stating that I think the reason locality was brought up was to highlight how each entity group can actually be persisted on a separate machine, thus speeding up read/

[google-appengine] Re: Entity Groups

2009-02-11 Thread Michael O'Brien
oops, maybe I've confused things then ... :) I was referring to Dave's comment, "If you do a bunch of processing on groups of entities in a single request then you can put them in a entity group, which should make that processing faster because they will be kept close." I took that to mean local

[google-appengine] Re: Entity Groups

2009-02-11 Thread ryan
the spirit of the conversation here is definitely on the right track. the only thing i'd contribute is to confirm that queries specifically, at least right now, don't benefit much from the locality provided by entity groups. they may benefit a little, but not a lot. details in http://groups.google

[google-appengine] Re: Entity Groups - does write time increase as # of objects in entity group increase?

2010-06-24 Thread Blixt
I haven't read up on how the datastore *really* works, but here's my guess: I think the datastore simply locks an entity group, and then before writing it makes sure there is no lock on the entity group. So the answer is no, it won't get slower as the number of entities in an entity group increase

[google-appengine] Re: Entity Groups - does write time increase as # of objects in entity group increase?

2010-06-24 Thread Mark
Ok great, that's how I was hoping it worked, thanks guys, Mark On Jun 24, 3:46 am, "Nick Johnson (Google)" wrote: > Hi Mark, > > No, write latency won't depend on the number of entities in the entity group > - only on the rate of writes to the group. > > -Nick Johnson > > > > > > On Thu, Jun 24,

[google-appengine] Re: Entity groups - more the merrier? At least this paragraph in the google article says so

2010-12-30 Thread Philip
Having entity groups does not affect performance but If all your entities are within a single group you will get serious performance issues since each group can only handle about 2 updates per second. On Dec 30, 8:04 pm, nischalshetty wrote: > "The more entity groups your application has—that is,

[google-appengine] Re: Entity groups - more the merrier? At least this paragraph in the google article says so

2010-12-30 Thread Tonny
How groups perform depends on what (and probably more importen: how often) you do with them. Having everything in one group will cause congestion. Groups should only be used when transactions are needed Cheer Tonny On Dec 30, 8:04 pm, nischalshetty wrote: > "The more entity groups your applicati

[google-appengine] Re: Entity groups - more the merrier? At least this paragraph in the google article says so

2010-12-31 Thread Stephen
On Thursday, December 30, 2010 7:04:48 PM UTC, nischalshetty wrote: > > "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" > > I read this above line here - > ht