Store Datastore Models in Google App Engine Cloud
Yesterday I came across this gem of a Blog post on Nick Johnson’s Blog about how to go about efficiently storing Google App Engine datastore objects in Memcache on the cloud.
I had previously read that the Datastore models were large and carried around a lot of baggage (software baggage that is, not the stuff on wheels!) – this is one reason why you are discouraged from passing them as arguments to tasks on task-queues.
This blog shows you how to extract and store only the essential info from the objects for storage in memcache using th methids model_to_protobuf () and model_from_protobuf()
Anyway, enough chat – here’s the post:
http://blog.notdot.net/2009/9/Efficient-model-memcaching
Yes. We used Google protocol buffer encoding of data on the embedded access control system I worked on. It’s a very efficient way of encoded data in a binary format. We looked at using SOAP, but that required about 100 times the bandwidth.