python - GAE/P: Storing list of keys to guarantee getting up to date data -


in google app engine app, have large number of entities representing people. @ times, want process these entities, , important have date data. there far many put them in same entity group or cross-group transaction.

as solution, considering storing list of keys in google cloud storage. use person's email address key name can store list of email addresses in text file.

when want process of entities, can following:

  1. read file google cloud storage
  2. iterate on file in batches (say 100)
  3. use ndb.get_multi() entities (this give recent data)
  4. process entities
  5. repeat next batch until done

are there problems process or there better way it?

if, in comments, lists change , cant use ancestors (i assume because of write frequency in rest of system), proposed solution work fine. can many get(multi) , wish, datastore can handle it.

since mentioned can handle having keys list updated needed, way it. can stream-read big file (say cloud storage 1 row per line) , use datastore async reads finish or use google cloud dataflow reading , processing/consolidating. dataflow can used instantly generate keys list file in cloud storage.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -