In some ways, the Google App Engine is a dream. Not thinking about the app server is wonderful. Deploying couldn't be easier.
I hate the GAE datastore with the passion of a thousand blazing suns, however. 90% of the work of this project has been trying to figure out workarounds and kludges for its bizzare limitations, like
- There is no mass delete. None. No truncate. No way to get rid of a large number of records at once.
- Bulk upload exists, but it always appends to the datastore - never replaces - which brings you right back to the "no mass delete" problem.
- No long-running operations - anything that would take more than a couple seconds dies - so you can't loop over all your records to do something (like delete them).
- Countless unexpected restrictions on queries. Can't filter on one property while sorting on another. Can't do inequality filters on more than one property. Can't filter on a string property if it is multiline (has \n's) or is longer than 500 characters (type Text). Can't use any function calls or arithmetic within a WHERE clause. Queries that fetch a large number of records die instead of completing (so I fetch in LIMIT 20 batches and assemble the results on the app side... crazy).
My workaround for mass deletion was to write pages that would delete one record, then invoke it in a loop from my client computer. That has to run all night to clean out the datastore when new data is uploaded.
But anyway. I'm still very happy. It works!
No comments:
Post a Comment