Slide 1

Slide 1 text

Django 1.7 on App Engine It could work!

Slide 2

Slide 2 text

Massimiliano Pippi dev.pippi.im @maxpippi

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

● 2008: App Engine dev preview release ● 2009: Django 1.0 added to the Python runtime ● 2011: django-nonrel ● [ … ] ● 2014: Cloud Sql GA release

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

pip install django -t /path/to/application/root # gae.pth /usr/local/google_appengine import dev_appserver; dev_appserver.fix_sys_path() import sys; sys.path.insert(1, ‘/path/to/application/root’) How?

Slide 8

Slide 8 text

Why?

Slide 9

Slide 9 text

Managed DB instances Cloud SQL ● fully managed: up and down scaling ● replication, patch management, backups ● no data lock-in ● MySql 5.5 and 5.6 available don’t be a jerk on MySql!

Slide 10

Slide 10 text

Media storage Google Cloud Storage ● S3 fashioned file storage (versioning, CDN, ACLs, …) ● django media files (static files are smoothly handled by app engine by itself) ● no lock-in: implemented as a django custom file storage

Slide 11

Slide 11 text

In-memory caching Memcache ● shared or dedicated instances ● monitoring tools come for free ● no lock-in: implemented as a django cache backend

Slide 12

Slide 12 text

Asynchronous tasks Task Queue ● automatic scaling ● no more celery / python-rq ● workers hit http endpoints

Slide 13

Slide 13 text

Push notifications Google Channel API ● provides js client via CDN ● easy to use ● not well suited if latency is key

Slide 14

Slide 14 text

Authentication A non-feature of the Google Cloud Platform Getting rid of the Google Authentication system Use the more flexible Django contrib.auth framework instead

Slide 15

Slide 15 text

External resources github.com/masci/django-appengine-toolkit ● no need to pip install -t ● memcache as cache backend ootb ● cloud storage as storage backend ootb ● database config from env vars

Slide 16

Slide 16 text

Why not? Technology lock-in depending on the Google Cloud components in use Cloud SQL has no free tiers Python 2 only :(

Slide 17

Slide 17 text

Thank you! dev.pippi.im @maxpippi