Talking with one of my devs about why you would want Async reads.. He says: Why would I want to do that, who says Gee I may want to read this thing later guess I should ask for it. You do a read when you need it. I say back: Let's test that bugger I bet I can make things go faster using it. Normally when you fire up your code, you say "hey Memcache do you have the answer to this query I just got?" "Oh you don't Fine I'll see if it is in the datastore" "By the way Memcache here is that data I just pulled from the datastore" Now if you instead do this It is faster, but costs more money. "Hey data I may need this information" "Memcache have you got it?" "No? Well fine I'll wait for DataStore" "Memcache here you go" Of course this is even more efficient if you are doing it for Initialization Variables like a "config" because the first thing you do can be to request the "config" and when you need it 20 lines of code later, it may not be ready, but it will be closer. In our test app these changes saved 35 ms and increased the number of Datastore reads by 500% (averaging 1 data store reads per request up to 5) on 100,000 requests that is just about 1 CPU hour ($.08) and 400k Reads ($.28) so the cost is not a win, but requests were faster. If I serialized this.. That should take it to 2 (instead of 5) and would be adding only 100k reads ($.07) a net win. And yes for that serialization it works, I'm doing a config file and so it is just comma separated array, compared with the more complex stuff I want to use something more "real" for.
-- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
