google app engine python
play

Google App Engine - Python Douglas Starnes SciPy 2011 Austin, - PowerPoint PPT Presentation

Google App Engine - Python Douglas Starnes SciPy 2011 Austin, Texas Agenda Lightning Round of GAE features Overview Data storage (datastore, blobstore, memcache) Task management (queues, backends) Development and


  1. Google App Engine - Python Douglas Starnes SciPy 2011 Austin, Texas

  2. Agenda • ‘Lightning Round’ of GAE features • Overview • Data storage (datastore, blobstore, memcache) • Task management (queues, backends) • Development and Deployment Environments • Odds and Ends • Integration With SciPy

  3. Overview of GAE Python Application SDK Server Application ID and version Endpoint mappings app.yaml Static file mappings appcfg Options GAE Request handlers Models .py .py dev_appserver .py Application logic 3rd party modules Datastore bulkloader css .py .py Static resources img Services js html remote_api_shell .py .py Configuration index.yaml cron.yaml

  4. Datastore • Non-relational structured table storage • “NoSQL” & “column oriented” • Based on Google’s BigTable

  5. Datastore • Define data model (kind) using objects • Base db.Model class implements select, insert, update, delete • Expando base class for dynamic properties • First time object is inserted (put) datastore will handle the rest • GQL queries for select only, all others programmatic access

  6. Datastore • Indexes for simple queries are built automatically • Queries with multiple sort orders and multiple inequality comparisons need manual indexes (index.yaml) • Cannot index blob or large text properties • Support for transactions and asynchronous queries • bulkloader & remote_api_shell • Viewer and statistics in web admin

  7. Blobstore • Unstructured & binary data storage • Blobs are immutable • Unrelated to BlobProperty in datastore • Can download blobs through web admin • Maximum size == 2GB / Maximum read == 1MB • Blobs uploaded via web forms* • Experimental support for virtual file system to programmatically create blobs

  8. Memcache • In memory key/value storage • Intended for short term storage • Values expire or can be released if system is low on memory • Maximum size of an entry == 1MB

  9. Task Management • GAE Python does not (currently) support multi- threading • webapp limits requests to 30 seconds • Task queues have a 10 minute limit • Backends are GAE instances with no time limit (also have more memory and CPU time, more configurable) • Backends cost extra! • “Cron” jobs also supported (cron.yaml)

  10. Enviroment • Officially Python 2.5.2 is supported • PyYAML and simplejson included • Several modules (marshal, socket) are empty • Any pure Python code (no C extensions) will work

  11. SDK • Windows, Mac OS X and Linux • Command line and UI tools (UI not on Linux) • Local development server • Interactive console • Services emulated on local server • Open source

  12. Deployment • Command line or UI tool (no FTP) • Versioning • Code download • Access to raw server logs • Web-based admin

  13. Odds and Ends • Runtimes for Java and Go • Authentication against Google accounts • AppStats • gdata-python-client • Django-nonrel • kay-framework (“Kay makes Appengine Yummy”) • http://code.google.com/appengine

  14. Integration With SciPy • ProtoRPC • Pull Queues

  15. Questions? douglas@poweredbyalt.net www.poweredbyalt.net

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend