Google App Engine(GAE)

28
Google App Engine(GAE) Ma, Zhichao 2012.06.19

description

Google App Engine(GAE). Ma, Zhichao 2012.06.19. Cloud. Agenda. What is GAE? Why GAE? Pricing Experiment Assessment. GAE. Overview Runtime environment & Architecture Datastore Services Administration console. Overview. PaaS Run web apps on Google's infrastructure - PowerPoint PPT Presentation

Transcript of Google App Engine(GAE)

Page 1: Google App Engine(GAE)

Google App Engine(GAE)

Ma, Zhichao2012.06.19

Page 2: Google App Engine(GAE)

Cloud

Page 3: Google App Engine(GAE)

Agenda

What is GAE? Why GAE? Pricing Experiment Assessment

Page 4: Google App Engine(GAE)

GAE

Overview Runtime environment & Architecture Datastore Services Administration console

Page 5: Google App Engine(GAE)

Overview

PaaS Run web apps on Google's infrastructure Easy to build, Easy to maintain, Easy to

scale API Support languages: Python, Java(JVM-

based interpreter or compiler), Go Domain: http://youappid.appspot.com/ Who's using App Engine

Page 6: Google App Engine(GAE)

Runtime Environment(Java)

Servlet Environment, Java 6 No state 30 seconds limit Sandbox: walled arena

Page 7: Google App Engine(GAE)

Architecture

The App Engine request handling architecture

Page 8: Google App Engine(GAE)

DataStore

High Replication Datastore(HRD) Blobstore Google Cloud SQL

Page 9: Google App Engine(GAE)

High Replication Datastore(HRD)

Based on big table Schemaless JDO, JPA Kind, Entity, property, key

Page 10: Google App Engine(GAE)

……

kind

实体

属性属性

Page 11: Google App Engine(GAE)

Saving entities1. Entity e = new Entity(“STUDENT”);2. e.name = “zhangsan”;3. datastore.put( e );

Deleting entity1. Entity e = datastore.get(key);2. datastore.delete( e );

Page 12: Google App Engine(GAE)

Query API

Query q = new Query("Person"); q.addFilter("lastName", Query.FilterOperator.EQUAL, lastNameParam); q.addFilter("height", Query.FilterOperator.LESS_THAN, maxHeightParam);  PreparedQuery pq = datastore.prepare(q);  for (Entity result : pq.asIterable()) { }

GQL: SQL-like, no join

Page 13: Google App Engine(GAE)

GQL syntax: SELECT [* | <property list> | __key__]

FROM <kind>[WHERE <condition> [AND <condition> ...]][ORDER BY <property> [ASC | DESC] [, <property> [ASC | DESC] ...]][LIMIT [<offset>,]<count>][OFFSET <offset>]

<condition> := <property> {< | <= | > | >= | = | != } <value><condition> := <property> IN <list><condition> := ANCESTOR IS <entity or key>

Page 14: Google App Engine(GAE)

Blobstore

Object: Up to 2G Writing Files to the Blobstore

(Experimental)

Page 15: Google App Engine(GAE)

Google Cloud SQL

Web service Based on MySql Preview

Page 16: Google App Engine(GAE)

Services

Taskqueues and Cron jobs Memcache Images Users Mails Url Fetch ……

Page 17: Google App Engine(GAE)

Task Queues and Cron Jobs

Work that can’t be done within 30sec Ensures every task gets done

eventually Enqueue task within transaction Cron Jobs: scheduled tasks

Page 18: Google App Engine(GAE)

Administration console

Web-based interface Create and manage app View resource usage statistics View logs

Page 19: Google App Engine(GAE)

Agenda

What is GAE? Why GAE? Pricing Experiment Assessment

Page 20: Google App Engine(GAE)

Why GAE?

Scalability Lower total cost of ownership Rich set of APIs Fully featured SDK for local

development Ease of deployment Web administration console and

diagnostic utilities

Page 21: Google App Engine(GAE)

Agenda

What is GAE? Why GAE? Pricing and Quotas Experiment Assessment

Page 22: Google App Engine(GAE)

Pricing and Quotas

Free quotas pricing

 Instance Hours 28 hours/day $0.08 / hour

Datastore Stored Data

1G $0.24 / G / month

Outgoing Bandwidth 1G/day $0.12 / G

Email API 100 recipients/day $0.01 / 100 recipients

Datastore API 50k free read/write/small

$0.10/100k write ops$0.07/100k read ops$0.01/100k small ops

Page 23: Google App Engine(GAE)

Agenda

What is GAE? Why GAE? Pricing and Quotas Experiment Assessment

Page 24: Google App Engine(GAE)

Experiment

Page 25: Google App Engine(GAE)

Assessment

Easy to build Easy to scale Easy to maintain API Limit

Page 27: Google App Engine(GAE)

Q&A

Page 28: Google App Engine(GAE)

Thank you !