Sortable keys
A welcome addition (1.1.6, Nov 21, 2008)
if 'last_key' in request.REQUEST:
last_key = request.REQUEST['last_key']
else:
# Handle error and return ...
Get the last key value passed by the client.
if last_key == 'none':
query = Model.gql('ORDER BY __key__')
else:
key_ref = db.Key(last_key)
query = Model.gql('WHERE __key__ > :1
ORDER BY __key__', key_ref)
rows = query.fetch(ROWS_PER_GO+1)
Sort by key, using last key if provided and fetch
the number of rows you want to affect.
if len(rows) == ROWS_PER_GO+1:
# There's more, we need to recurse again
new_last_key =
str(rows[ROWS_PER_GO].key())
...
else:
# This is the last iteration.
Check if you need to recurse.
If so, set the new last key value.
No CRON jobs
Cannot run periodical tasks
WebBasedCron.com
Workaround: use an external CRON service.
Size matters
1MB limit on any object
aws.amazon.com/s3/
Workaround: Use Amazon S3 & CloudFront
infinitebits.org
FTP to S3 service by Benjamin Allfree
webapp Django
“Official” framework Lots more
functionality for free
Not very active
Very active
Guido doesn’t use it
Guido uses it
Allows subclassing
No subclassing of
You’ll likely use bits views
of it anyway
Great community
Plain Plain rocks!
Django
Which helper should you use?
(Depends on your needs)
Google App Engine Helper
The more “official” helper
app-engine-patch
The community “helper” led by Waldemar
Kornewal (@wkornewald)
GAE! What is it good for?
Use Cases and Don’t Use Cases
UCs DUCs
APIs Ecommerce
Facebook/Open (no SSL)
Social apps Sites that require
Static sites admin features (no
long running
processes)
CDN (file size limit of
1MB)
Why Google App Engine is
broken and what Google
must do to fix it.
http://aralbalkan.com/1504
App Engine’s Achilles' heel
A missing modus operandi
You read the announcements, skimmed some sample code, heck maybe you even hacked something together to kick the tires… but what is Google App Engine like to work with when you’re developing a real world application?
Last year Aral built the web site for the web conference using Google App Engine and Django. In the process, he learned some valuable tips, tricks, and workarounds, as well as some choice swear words that would make a sailor blush.
In this session, Aral will cover, in no particular order:
* Quota hell and the different types of quotas * webapp vs. Django: which framework should you choose? * Django App Engine Helper or app-engine-patch – pros/cons * How to fake long-running processes * How to fake cron jobs * Datastore tips * How to backup and restore your data and use staging apps less
1 comments
Comments 1 - 1 of 1 previous next Post a comment