Pergunta

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.

Foi útil?

Solução

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?

Outras dicas

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.

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top