Currently I am working on project that’s supposed to be used by a lot of people. I am worried that datastore read/write/small ops are using too much resources. Since I am new to appengine, are there any efficient ways to make those numbers smaller? I thought about using memcache but it’s not most secure way. Also is it a good idea to search for datastore entities using the:
SELECT __key__ FROM table
then use:
....#code
table.get_by_id(entity.id())
....#code
?
Thank you very much.
Since it looks like you are using python, I would highly recommend using the new datastore API, NDB.
NDB automatically uses memcache to cache it’s models behind the scenes without any extra work on your part. Granted you should also look at using memcache manually, ndb isn’t a silver bullet. But it’ll help you for free, which is always nice.
Beyond the performance gains it’s a cleaner interface to the app engine datastore. It also has clean support for bulk operations which can also be a performance boost.