GAE HR is one step towards scalability, separating commit and visibility, 
but one step back in usability. This separation creates a problem (the 
"eventual consistency"?) that kills its use in some  application designs. 
Usually, I commit inside a http request and redirect to another page that 
shows the results, but I have to make a small delay (many milliseconds) to 
try to get the changes of that commit. This is the easiest workaround I 
find for this, not a fix. Unfortunately, I do not have a guarantee that I 
got the changes of that commit. Due to multiple computing synchronism 
paradigm, I think it is not possible to know how long the change updates 
will take, what could take milliseconds, minutes or even days (in an 
improbable case).

I was wondering I could "fix" this by using timestamps, what are easy pass 
to another request in a query string or to store in a session memcache 
variable. If I have the timestamp of my last commit, any later query to the 
database could use this timestamp to check if the retrieved data was 
committed after that timestamp, if not, it retries the query again and 
again. This way I have the guarantee of the correct visibility ("strong 
consistency"?), even if takes a long time. It can eventually read data 
committed by another user/process after that timestamp, what I do not 
consider a problem. Is this approach correct?

I can implement this with a timestamp field in every table, but a lib would 
be better (built in timestamp fields, automatic tuning of polling time, 
internal cache session timestamp of last commit, and maybe some low level 
database callback instead of the polling). Is there a third party lib like 
this? I know ORM libs that use GAE low level database APIs, but I have no 
idea how to start something like that.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to