On Sun, Nov 23, 2008 at 1:38 PM, Andy Freeman <[EMAIL PROTECTED]> wrote:

>> Yes, I understand transactions and entity groups. Why do you need to
>> create an entity group *atomically*?
>
> For the same reason that transactions are useful - incomplete groups
> are wrong (in my application) and I'd rather not deal with them.

A two-stage insertion would work fine, then. Insert the first object
with a "not-ready" flag set, insert the second object, then go back
and flip the "not-ready" flag.

>> If you create a new entity, it will automatically be assigned a unique
>> key at the datastore level. What's wrong with just using that?
>
> Each db.put has significant overhead.  If I can generate a unique name
> without a db.put, I can reduce the number of db.puts that my
> application does by a factor of 2.

Generating an application-globally-unique name is hard, and App Engine
is mainly focused on applications where the writes are few and the
reads are many. Until you've benchmarked it, it sounds like you are
prematurely optimising for an operation that should be relatively
rare, while seriously increasing the complexity of your system. Who
said the datastore would be on the same machine as the running
application, anyway?


Dave.

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to