Google App Engine(GAE) Ma, Zhichao
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 Easy to build, Easy to maintain, Easy to scale API Support languages: Python, Java(JVM-based interpreter or compiler), Go Domain: Who's using App Engine
Runtime Environment(Java) Servlet Environment, Java 6 No state 30 seconds limit Sandbox: walled arena
Architecture The App Engine request handling architecture
DataStore High Replication Datastore(HRD) Blobstore Google Cloud SQL
High Replication Datastore(HRD) Based on big table Schemaless JDO, JPA Kind, Entity, property, key
…… kind 实体实体 属性
Saving entities 1. Entity e = new Entity(“STUDENT”); 2. e.name = “zhangsan”; 3. datastore.put( e ); Deleting entity 1. Entity e = datastore.get(key); 2. datastore.delete( e );
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
GQL syntax : SELECT [* | | __key__] FROM [WHERE [AND...]] [ORDER BY [ASC | DESC] [, [ASC | DESC]...]] [LIMIT [,] ] [OFFSET ] := { | >= | = | != } := IN := ANCESTOR IS
Blobstore Object : Up to 2G Writing Files to the Blobstore (Experimental)
Google Cloud SQL Web service Based on MySql Preview
Services Taskqueues and Cron jobs Memcache Images Users Mails Url Fetch ……
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
Administration console Web-based interface Create and manage app View resource usage statistics View logs
Agenda What is GAE? Why GAE? Pricing Experiment Assessment
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
Agenda What is GAE? Why GAE? Pricing and Quotas Experiment Assessment
Pricing and Quotas Free quotaspricing Instance Hours28 hours/day$0.08 / hour Datastore Stored Data1G$0.24 / G / month Outgoing Bandwidth1G/day$0.12 / G API100 recipients/day$0.01 / 100 recipients Datastore API50k free read/write/small$0.10/100k write ops $0.07/100k read ops $0.01/100k small ops
Agenda What is GAE? Why GAE? Pricing and Quotas Experiment Assessment
Experiment
Assessment Easy to build Easy to scale Easy to maintain API Limit
Useful resources pengine/pricing.html pengine/pricing.html
Q&A
Thank you !