Hi Taylor,
In our application, we had to solve a similar problem. Basically, we
needed to answer the question: what are my friends doing today?. Our
initial solution was (pseudo code):
events = []
for friend in friends:
friend_events = friend.what_are_you_doing_today()
I haven't given your situation much thought, but you could write the
list to memcache and have a cron job that reads memcache and does the
writing. You don't get instant results, but the user doesn't have to
wait.
Caution: you aren't going to be able to do queries that return 500 or
1000
We have some very early code that allows for multiple parallel
queries: http://code.google.com/p/asynctools/ This allows for a
different class of reading and avoids the need to compute/store
(certain types of) additional information.
In fact, it was Facebook friends graph stuff that inspired it
asynctools - excellent stuff, thx for releasing it!
how have you found the results when compared to running the queries
serially? was it significantly faster? when I was messing around with
the plumbing to make async qgl queries, I noticed they did run in
parallel but the datastore.Iterator._Get