Search code examples
google-app-enginedjango-nonreldjangoappengineeventual-consistency

DjangoAppEngine and Eventual Consistency Problems on the High Replication Datastore


I am using djangoappengine and I think have run into some problems with the way it handles eventual consistency on the high application datastore.

First, entity groups are not even implemented in djangoappengine.

Second, I think that when you do a djangoappengine get, the underlying app engine system is doing an app engine query, which are only eventually consistent. Therefore, you cannot even assume consistency using keys.

Assuming those two statements are true (and I think they are), how does one build an app of any complexity using djangoappengine on the high replication datastore? Every time you save a value and then try to get the same value, there is no guarantee that it will be the same.


Solution

  • Take a look in djangoappengine/db/compiler.py:get_matching_pk()

    If you do a djangomodel.get() by the pk, it'll translate to a Google App Engine Get(). Otherwise it'll translate to a query. There's room for improvement here. Submit a fix?