Introduction to Google App Engine

21
Introduction of Google App Engine Scale, scale and scale Colin Su, GTUG Taipei

description

Introduction to Google App Engine Taipei.py X Google Cloud Platform Workshop

Transcript of Introduction to Google App Engine

Page 1: Introduction to Google App Engine

Introduction of Google App EngineScale, scale and scale

Colin Su, GTUG Taipei

Page 2: Introduction to Google App Engine

This Slides

> Could be viewed online at Slideshare

> http://goo.gl/GRq3D

2

Page 3: Introduction to Google App Engine

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

Page 4: Introduction to Google App Engine

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

Page 5: Introduction to Google App Engine

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

Page 6: Introduction to Google App Engine

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

Page 7: Introduction to Google App Engine

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

Page 8: Introduction to Google App Engine

Workflow of Google App Engine

> Write your code

> Send your code

> Run your code

8

“TGIP”Thanks God It’s Python

Page 9: Introduction to Google App Engine

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

Page 10: Introduction to Google App Engine

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

Page 11: Introduction to Google App Engine

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”

Page 12: Introduction to Google App Engine

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

Page 13: Introduction to Google App Engine

13

Page 14: Introduction to Google App Engine

And More....

> MapReduce APIYou can use Google App Engine to do MapReduce by writing some Python code

> Google Cloud EndpointsEasily generate API client for Android/iOS and mapping to your APIs, let mobile applications could take advantages of GAE.

> BackendsExtend your instance for more memory and CPU by adding backend instance to your application

14

Page 15: Introduction to Google App Engine

Database?

> DatastoreNo-SQL data storage based on Google Big Table

> Google Cloud SQLYeah, it’s MySQL, you know that more than me

> NDBbetter Datastore, with a lot optimization

15

Page 16: Introduction to Google App Engine

What Else?

16

“Scale”Scale ability is the core of Google App Engine, it makes your web service

more flexible according to the requests

Page 17: Introduction to Google App Engine

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

Page 18: Introduction to Google App Engine

Are You Touched? Are You Thirsty?

> Let’s try it

> appengine-bottle-example @ Githubhttp://goo.gl/NexJ2 (case-sensitive)

> we will use bottle + Google App Engine today

18

Page 19: Introduction to Google App Engine

Resources

> Google App Enginehttp://developers.google.com/appengine

19

Page 20: Introduction to Google App Engine

Interested in more Google stuffs?

> Here!

> GTUG Taipeihttp://taipei-gtug.org

> Google Developershttp://developers.google.com

20

Page 21: Introduction to Google App Engine

ThanksHappy Scaling!