3. Who am I
> LittleQ
> Software Engineering Intern @ NodeRabbit, Appsembler
> django-deployer project @ Google Summer of Code (Django Foundation)
> Co-Organizer @ Google Technology User Group Taipei
> Python, Erlang, Deploy, Shell Script, Cmd Tools
> http://about.me/littleq
3
4. Preliminaries
> Today we will have a little practice to hands-on Google App Engine, before we
started, you can
- get your laptop ready
- install “App Engine SDK for Python” beforehand
- launch the launcher, create a project, and see how it works
4
5. Why We Need Cloud?
✓ too much data that your PC/server couldn’t store
✓ too much computation your PC/server couldn’t deal with
✓ we have to scale
x we need a website
x we must look like fancy/cool/modern/impressive....
5
WHY
WHY NOT
6. Google Cloud Platform
> covered SaaS, PaaS, IaaS
- Google SaaS: GMail, Google Calendar, YouTube, Google Reader <- (x_x )
- Google PaaS: Google App Engine
- Google IaaS: Google Compute Engine
6
7. What is PaaS
> Platform as a Service
- I do care
✓ application code
✓ scale
✓ money
- I don’t care
x server management
x setup environment, deploy flow
7
8. Workflow of Google App Engine
> Write your code
> Send your code
> Run your code
8
“TGIP”
Thanks God It’s Python
9. What Can My Code Do?
> Almost all things which you can do with Python
(there’s some limitation, we’ll talk about it)
> Various APIs provided by Google App Engine
> Pure Python third-party libraries
9
10. Services Party, Oh NO! (T_T)
> In traditional server architecture, you will need to setup the following things
sometimes
- SMTP for sending emails
- Message Queue for queuing your jobs
- Hadoop for running map/reduce
- Ejabberd for realtime chat service
- Redis for in-memory storage
10
11. There’s More
- SCSS/Compass for minifying your CSS
- minify for minifying your JavaScript
- CDN for serving your static content quickly
- Logging system for logging and send you msg when sth goes wrong
- ......
11
“But you just want a website”
12. APIs Party, Oh Yeah!
> Google App Engine provides these APIs to prevent you become nuts by setting up
those services
12
๏ Mail API
๏ Blobstore APi
๏ Channel API
๏ Images API
๏ Logs API
๏ Memcache API
๏ OAuth API
๏ Search API
๏ Sockets API
๏ URL Fetch API
๏ Users API
๏ XMPP API
๏ Task Queue API
๏ ....and more
14. And More....
> MapReduce API
You can use Google App Engine to do MapReduce by writing some Python code
> Google Cloud Endpoints
Easily generate API client for Android/iOS and mapping to your APIs, let mobile
applications could take advantages of GAE.
> Backends
Extend your instance for more memory and CPU by adding backend instance to
your application
14
15. Database?
> Datastore
No-SQL data storage based on Google Big Table
> Google Cloud SQL
Yeah, it’s MySQL, you know that more than me
> NDB
better Datastore, with a lot optimization
15
17. How Did They Do?
> send your code/data to the nearest data center based on where your requests
from
> if your application contains only code but not data, good, sending code is much
easier, it’s just some text files
> increase number of your instances automatically while your requests/business
getting bigger
17
18. Are You Touched? Are You Thirsty?
> Let’s try it
> appengine-bottle-example @ Github
http://goo.gl/NexJ2 (case-sensitive)
> we will use bottle + Google App Engine today
18