Archive for the 'Appengine' Category

Dec 02 2008

Google Appengine Notes

Published by Alek under Appengine,Development,Geek,Guides

I’ve been using appengine for a side project lately and it’s pretty sweet! However performance isn’t guaranteed, especially with a naive model. Some learned points:

  • Avoid accessing the datastore. Especially writes. GAE is highly optimized for frequent reads and infrequent writes.
  • Related to that, favor fewer large objects over many small objects in the datastore. It’s much better to load and deserialize an object tree than to make a query for each object type. This will reduce your round trips to the datastore. Also there is no way to bulk delete rows but if you have your objects as a pickled collection in a db.Blob, you can delete many elements from the collection in a single access. Pretty nice actually.
  • Avoid writing to the same objects concurrently. This needs to be balanced with the previous point. The contention will kill your performance as you get more users. However if writes really are rare in your model this is fine.

No responses yet