speedplane
speedplane

Reputation: 16121

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.

Upvotes: 0

Views: 257

Answers (3)

dragonx
dragonx

Reputation: 15143

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?

Upvotes: 1

Daniel Roseman
Daniel Roseman

Reputation: 599610

No matter what the system you put on top of the AppEngine models, it's still true that when you save it to the datastore you get a key. When you look up an entity via its key in the HR datastore, you are guaranteed to get the most recent results.

Upvotes: 0

Nischal
Nischal

Reputation: 958

Don't really know about djangoappengine but an appengine query if it includes only key is considered a key only query and you will always get consistent results.

Upvotes: 0

Related Questions