In a python based facebook application on GAE, i want to check which friends of current user have “marked” a web page or not.
For this i have to run as many DB queries as the number of friends (say 100)
I fear this may run into “timeout” because of large no of queries.
Google DOCs suggest that “list” queries run in parallel, will this save time ??
Also list has a limit of 30, so i have to make 2 or 3 queries of list type.
Please suggest a better way if possible, using task ques or something….
You can fetch up to 1000 entities in parallel if you already know their keys or their key names.
There are a few ways to solve your specific problem. Here are is one.
Let’s assume that when a user “marks” a web page, you create an entity with a key_name that derives from a user’s facebook id and the page key.
This allows you to fetch all the users who marked a page in parallel: