Real World Google App Engine Aral Balkan Jan 2009

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

4 Favorites

Real World Google App Engine Aral Balkan Jan 2009 - Presentation Transcript

  1. Real-world Google App Engine Aral Balkan (@aral, http://aralbalkan.com)
  2. This is not an introduction to Google App Engine!
  3. Google App Engine is really good at scaling... ... a request/response model within various limitations and subject to certain quotas.
  4. Request/response No long running processes or CRON jobs
  5. Fake it!
  6. return HttpResponseRedirect (“/recurse/lastKey/”) No long-running processes Workaround #1: Server-side redirect
  7. <meta http-equiv=\"refresh\" content=\"0;url=/recurse/lastKey/\" /> No long-running processes Workaround #2: Meta refresh
  8. $.post( url, {lastKey: lastKey}, callback, \" json \"); No long-running processes Workaround #3: JavaScript
  9. Sortable keys A welcome addition (1.1.6, Nov 21, 2008)
  10. 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.
  11. 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.
  12. 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.
  13. No CRON jobs Cannot run periodical tasks
  14. WebBasedCron.com Workaround: use an external CRON service.
  15. Size matters 1MB limit on any object
  16. aws.amazon.com/s3/ Workaround: Use Amazon S3 & CloudFront
  17. infinitebits.org FTP to S3 service by Benjamin Allfree
  18. pyamf.appspot.com/shell/ Ajax shell: http://shell.appspot.com/
  19. Growing pains 1,000 file limit per application
  20. Growing pains Workaround: zipimport
  21. Zipping up Django http://aralbalkan.com/1757
  22. Quotas
  23. Quotas CPU time: 46.30 hours Bandwidth: 10GB (out/in, 20GB total) Secure bandwith: 2GB (out/in, 4GB total) 2000 emails 0.5GB stored data
  24. Evil Quotas
  25. Evil quota #1 Short-term high CPU usage quota
  26. Evil quota #2 Short-term email limit (officially 2, empirically 30)
  27. Sailthru.com triggermail $1.50 cpm mass mail, $6.00 transactional
  28. Web Hooks (Jeff Lindsay) http://webhooks.pbwiki.com/ smtp2web http://smtp2web.com/ astrotrain http://github.com/entp/astrotrain/tree/master
  29. Secret evil quota solution (Ssshh, don’t tell anyone)
  30. Please sir, may I have some more?
  31. Django or webapp? Which framework should you use?
  32. 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!
  33. Django Which helper should you use? (Depends on your needs)
  34. Google App Engine Helper The more “official” helper
  35. app-engine-patch The community “helper” led by Waldemar Kornewal (@wkornewald)
  36. Helper Patch More official Community-run Slow updates Frequent updates Django models Webapp models Admin panel Self-contained, reusable apps. Context-issues solved in GAE 1.1.8
  37. GAE! What is it good for? Use Cases and Don’t Use Cases
  38. 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)
  39. Why Google App Engine is broken and what Google must do to fix it. http://aralbalkan.com/1504
  40. App Engine’s Achilles' heel A missing modus operandi
  41. Request/response Admin Needs to scale Does not

+ Aral BalkanAral Balkan, 10 months ago

custom

5233 views, 4 favs, 9 embeds more stats

Real World Google App Engine

You read the announce more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 5233
    • 5013 on SlideShare
    • 220 from embeds
  • Comments 1
  • Favorites 4
  • Downloads 213
Most viewed embeds
  • 194 views on http://aralbalkan.com
  • 8 views on http://static.slideshare.net
  • 8 views on http://www.slideshare.net
  • 4 views on http://tumblr.codegent.com
  • 2 views on http://tumblr.iamdanw.com

more

All embeds
  • 194 views on http://aralbalkan.com
  • 8 views on http://static.slideshare.net
  • 8 views on http://www.slideshare.net
  • 4 views on http://tumblr.codegent.com
  • 2 views on http://tumblr.iamdanw.com
  • 1 views on http://www.tagged.com
  • 1 views on http://www.agglom.com
  • 1 views on http://tonyhsieh.blogspot.com
  • 1 views on http://safe.tumblr.com

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories