Strong consistency is guaranteed if your queries as ancestor queries using
entity groups. Or ... if you write by key and read by key, these will always
be strongly consistent.

The only case in which strong consistency is NOT guaranteed is if you write
an entity, then do a cross entity group query on a property. Example pseudo
code:

deal =  {
   name: "My deal",
   cost: 25.00
}

datastore.put(deal)
datastore.query("SELECT from deal where cost >= 25.00");

Since you aren't setting an ancestor, this *may* go to a data center that
didn't yet commit the write. Note that this is generally unlikely. A better
way to structure this:

dealFamilySF = {
  name: "San Francisco Bay Area"
}

deal =  {
   parent: dealFamily,
   name: "My deal",
   cost: 25.00
}

datastore.put(deal)
datastore.query("SELECT from deal where cost >= 25.00 AND ancestor IS
dealFamilySF");

This query will be strongly consistent.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Fri, Apr 8, 2011 at 3:50 AM, Kyle Mulka <[email protected]> wrote:

> On Apr 7, 10:20 am, "Ikai Lan (Google)" <[email protected]> wrote:
> > Yes, we'd love to do that at some point in the future - pick a general
> area
> > where your apps would exist, and we'd run them from those nodes. I
> suspect
> > that if we ever did this feature and you wanted to move to a new cluster,
> > that you would have to run the datastore migration tool (similar to what
> it
> > would take to move from MS -> HR), and if you're going to do this, why
> not
> > just move to high replication?
>
> I'm not that worried about running the migration tool. Should I be?
> I'm worried about the eventual consistency model of the high
> replication datastore. I want a user of our app to be able to create
> an object in the datastore and then be able to read it right away.
>
> --
> Kyle Mulka
> Co-Founder, DealSavant
> http://www.dealsavant.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
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