lecture13 intro. to google app engine

22
Platform as a Service (PaaS)

Upload: brent

Post on 08-Jan-2016

63 views

Category:

Documents


1 download

DESCRIPTION

lecture13 Intro. to Google App Engine. Keke Chen Based on Guido van Rossum’s presentation. Outline. Introduction to Google AppEngine Comparison with EC2. Google App Engine. Does one thing well: running web apps Simple app configuration Scalable Secure. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: lecture13  Intro. to Google App Engine

Platform as a Service (PaaS)

Page 2: lecture13  Intro. to Google App Engine

Scope:

1. Platform as a Service (PaaS)

2. What is Google App Engine.• Overview• Programming languages support• Data storage• App Engine services• Security

3. When to use Google App Engine.

4. How to use Google App Engine.

Page 3: lecture13  Intro. to Google App Engine

1. Platform as a Service (PaaS)

• Cloud computing service which provides a computing platform and a solution stack as a service.• Consumer creates the software using tools and/or libraries from the provider. • Provider provides the networks, servers, storage, etc.

Page 4: lecture13  Intro. to Google App Engine

GAE is part of Google Cloud

• Using Googles Infrastructure to host and build your Web Applications

Page 5: lecture13  Intro. to Google App Engine

2. What is Google App Engine.• Overview

Google App Engine (GAE) is a Platform as a Service (PaaS) cloud computing platform for developing and hosting web applications in Google-managed data centers.

Google App Engine lets you run web applications on Google's infrastructure.

Easy to build. Easy to maintain.Easy to scale as the traffic and storage needs grow.

Free ???Yes, free for upto 1 GB of storage and enough CPU and bandwidth to support 5 million page views a month. 10 Applications per Google account.

Page 6: lecture13  Intro. to Google App Engine

infrastructure vs. platform - What is “The Platform”?

Platform: same for all applications

Libraries: shared by multiple applications

Application-specific code

infrastructure: hidden by platform

Page 7: lecture13  Intro. to Google App Engine

What does GAE Provide

7

Page 8: lecture13  Intro. to Google App Engine

GAE architecture featuring java

8

Page 9: lecture13  Intro. to Google App Engine

2. What is Google App Engine.• Programming languages support

Java:• App Engine runs JAVA apps on a JAVA 7 virtual machine (currently supports JAVA 6 as well).• Uses JAVA Servlet standard for web applications:

•WAR (Web Applications ARchive) directory structure.• Servlet classes• Java Server Pages (JSP)• Static and data files• Deployment descriptor (web.xml)• Other configuration files

• Getting started :https://developers.google.com/appengine/docs/java/gettingstarted/

Page 10: lecture13  Intro. to Google App Engine

2. What is Google App Engine.• Programming languages support

Python:• Uses WSGI (Web Server Gateway Interface) standard.• Python applications can be written using:

• Webapp2 framework• Django framework• Any python code that uses the CGI (Common Gateway Interface) standard.

•Getting started :https://developers.google.com/appengine/docs/python/gettingstartedpython27/

Page 11: lecture13  Intro. to Google App Engine

2. What is Google App Engine.• Programming languages support

Google’s Go:• Go is an Google’s open source programming environment.• Tightly coupled with Google App Engine.• Applications can be written using App Engine’s Go SDK.• Getting started:

https://developers.google.com/appengine/docs/go/overview

PHP (Experimental support):• Local development servers are available to anyone for developing and testing local applications.• Only whitelisted applications can be deployed on Google App Engine. (https://gaeforphp.appspot.com/).• Getting started: https://developers.google.com/appengine/docs/php/

Page 12: lecture13  Intro. to Google App Engine

2. What is Google App Engine.• Data storage

App Engine Datastore:• NoSQL schema-less object based data storage, with a query engine and atomic transactions.• Data object is called a “Entity” that has a kind (~ table name) and a set of properties (~ column names).• JAVA JDO/ JPA interfaces and Python datastore interfaces.

Google cloud SQL:• Provides a relational SQL database service.• Similar to MySQL RDBMS.

Page 13: lecture13  Intro. to Google App Engine

2. What is Google App Engine.• Data storage

Google cloud store:• RESTful service for storing and querying data.• Fast, scalable and highly available solution. • Provides Multiple layers of redundancy. All data is replicated to multiple data centers. • Provides different levels of access control. • HTTP based APIs.

Page 14: lecture13  Intro. to Google App Engine

2. What is Google App Engine.• App Engine services

App Engine also provides a variety of services to perform common operations when managing your application.

• URL Fetch:• Facilitates the application’s access to resources on the internet, such as web services or data.

• Mail:• Facilitates the application to send e-mail messages using Google infrastructure.

• Memcache:• High performance in-memory key-value storage. • Can be used to store temporary data which doesn’t need to be persisted.

Page 15: lecture13  Intro. to Google App Engine

2. What is Google App Engine.• Security

The sandbox:• All hosted applications run in a secure environment that provides limited access to the underlying operating system. • Sandbox isolates the application in its own secure, reliable environment that is independent of hardware, operating system and physical location of a web server.• Limitations imposed by sandbox (for security):

• An application can only access other computers over internet using the provided URL fetch and email services. Other computers can only connect to the application through HTTP/ HTTPS requests on the standard ports (80/ 443).• Applications cannot write to local file system in any of the runtime environments. • Application code runs only in response to a web request, a queued task or a scheduled task and must return the response data within 60 seconds. A request handler cannot spawn a sub-process or execute code after the response has been sent.

Page 16: lecture13  Intro. to Google App Engine

3. When to use Google App Engine.

Use App Engine when:

• You don’t want to get troubled for setting up a server.• You want instant for-free nearly infinite scalability support.• Your application’s traffic is spiky and rather unpredictable.• You don't feel like taking care of your own server monitoring tools.• You need pricing that fits your actual usage and isn't time-slot based (App engine provides pay-per-drink cost model).• You are able to chunk long tasks into 60 second pieces.• You are able to work without direct access to local file system.

Page 17: lecture13  Intro. to Google App Engine

3. When to use Google App Engine.• Business running on Google App Engine

• http://www.lowes.com/•Uses App Engine to host their MyLowes service used by customers to customize and personalize their home improvement projects.

• http://www.getaround.com/•Peer-to-peer car sharing and local car rental service.

•http://kissflow.com/• Workflow service based on Google applications.

Source – Google I/O 2012 – App Engine Overview (https://www.youtube.com/watch?v=uy0nALQEAM4 )

Page 18: lecture13  Intro. to Google App Engine

4. How to use Google App Engine.

Google App Engine Hello World tutorials:

•JAVA:http://www.mkyong.com/google-app-engine/google-app-engine-hello-world-example-using-eclipse/

• Python:http://www.mkyong.com/google-app-engine/google-app-engine-python-hello-world-example-using-eclipse/

More information:https://developers.google.com/appengine/

Page 19: lecture13  Intro. to Google App Engine

Free tier

• First 5GB• Daily limits see Online for CURRENT QUOTAS

19

Page 20: lecture13  Intro. to Google App Engine

What happens when you exceed your budget (free or what you set) • When an application consumes all of an

allocated resource, the resource becomes unavailable until the quota is replenished.

• This may mean that your application will not work until the quota is replenished.

20

Page 21: lecture13  Intro. to Google App Engine

What happens when you exceed your budget (free or what you set) • For resources that are required to initiate a request, when the resource is

depleted, App Engine by default returns an HTTP 403 Forbidden status code for the request instead of calling a request handler. The following resources have this behavior:– Bandwidth, incoming and outgoing

• For all other resources, when the resource is depleted, an attempt in the application to consume the resource results in an exception. This exception can be caught by the application and handled, such as by displaying a friendly error message to the user. In the Python API, this exception is apiproxy_errors.OverQuotaError. In the Java API, this exception is com.google.apphosting.api.ApiProxy.OverQuotaException.

21

Page 22: lecture13  Intro. to Google App Engine

Pricing• The part exceeding the free quota• User defined budget • Look On line for CURRENT PRICES

22