appengine-mapreduce
appengine-mapreduce copied to clipboard
python "MapReduce in Three Simple Steps" does not correctly render files table -- eventual consistency problem?
The python/demo index.html does not correctly render last-added files to the user's uploaded files table even though the upload POST culminates in a redirect (refresh) of the page.
If the refresh is performed manually, the table will render correctly.
I suspect (!?) this is an eventual consistency issue and FileMetadata are root (without parent) entities. It's a minor glitch but the UI is confusing by its omission. The user would have to know to refresh manually or abandon their demo and return and be surprised by the magical appearance of previous uploads.
Is my suspicion correct? And, Is it worth pursuing a fix through the addition of a (probably non-existent) parent and the additional of an ancestor query for strong consistency?
You are correct: https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/master/python/demo/main.py#L133
Your proposal sounds reasonable. I think the parent entity should probably be the user as that provides a rather convenient segmentation. If you'd like to take a stab at making a patch, I'll be happy to review it.