Hi, gae just came out w/ high replication datastore.  The bad side effect is 
that the data you insert into the datastore will not immediately become 
consistent until after a few seconds in most cases called eventual 
consistency.   If you want to be able to query consistent data, then 
according to the doc you have to insert the data w/ a parent key and query 
using the key as ancestor.

1)  I understand the reason for eventual consistency i.e. because the 
backend has to copy the data to all the database nodes to achieve high 
replication hence the delay of consistency.    But why is it if I insert an 
entity w/ a parent key, then all of a sudden this problem of eventual 
consistency goes away?   The doc (
http://code.google.com/appengine/docs/java/datastore/hr/overview.html) doesn't 
explain.   How does the parentKey (ancestory) solves the problem?   

2)  Let's say I have a table/entity called "socialsecurity" and 
column/property is called "number".  I chose to have high replication 
datastore because it's mission critical.   The objective is to insert UNIQUE 
value into "number" property of the "socialsecurity" entity.     The problem 
is after I insert a value ABC, the datastore is not guaranteed to be 
consistent, so if I do a look up to see if the next value (also ABC) is 
already in the datastore I may get a false even though ABC is already in the 
datastore but just not consistent yet.    So according to the doc, I should 
insert the entity w/ some parentKey then query w/ the parentKey as the 
ancestor?      how does it affect the read performance?      since I don't 
understand how ancestor key help w/ eventual consistency I couldn't even 
speculate on the performance impact.

Any db guru can shed some light?

-- 
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.

Reply via email to