Click here to load reader
Oct 21, 2014
PowerPoint Presentation
Duy Lam 2011
Useful Google App Engine services (Python language)
Lm Phng DuyWeb Developer, KMS Technology Vietnam
Email: [email protected]
Me
Youre a web developer ?
This discussion:Highlight notable and useful Google App Engine servicesNot focus on Python language
Audience & Objectives
Discuss Google App Engine services that differentiate themselves from other cloud platform service providers such as Microsoft Windows Azure
The use of Python language in this present is to show the audience another new , great language instead of the well-known Java language
3
4
runs your web applicationoffers variety of services for common operations of web application (via provided SDK)
App Engine ?
Cloud computing
5
runs your web application
App Engine ? (cont.)
Java Environment
Python Environment
Java SE Runtime Environment 6*
Python runtime 2.5.2*
Java Servlet standard and JavaServer Pages
Django, CherryPy, Pylons, web.py and webapp**
JavaSDK service
Python SDK service + thirdparty libraries*
* must meet secure environment restrictions ** built by Google App Engine
webapp: a simple web framework built by Google App Engine
Third-party python libraries: example: web application framework, cryptography, YAML parsing libraries etc.
6
offers variety of services for common operations of web application (via provided SDK)
App Engine ? (cont.)
Datastoring : a robust, scalable storage for your web application, with an emphasis on read and query performanceBlobstore: to serve data objects, called blobs, that are much larger than the size allowed for objects in the Datastore serviceXMPP: to send and receive chat messages to and from any XMPP-compatible chat messaging service, such as Google TalkProspective Search: a querying service that allows your application to match search queries against real-time data streams (no need of pre-index the data)Images: the ability to manipulate image data using a dedicated Images serviceMail: send and receive emailMemcache: a distributed in-memory data cache in front of or in place of robust persistent storageMultitenancy: Multitenancy is the name given to a software architecture in which one instance of an application, running on a remote server, serves many client organizations (also known as tenants). Using the Namespaces API, you can easily partition data across tenants simply by specifying a unique namespace string for each tenantOAuth: OAuth is a protocol that allows a user to grant a third party limited permission to access a web application on her behalf, without sharing her credentials (username and password) with the third party. The application seeking permission is theconsumer, and the application providing the data is theservice provider. Using Google Accounts and a simple API, any App Engine application can be an OAuth service providerChannel: creates a persistent connection between your application and Google servers, allowing your application to send messages to JavaScript clients in real time without the use of pollingTask Queues: If an app needs to execute some background work, it may use the Task Queue API to organize that work into small, discrete units, calledtasksURL Fetch: An app can use the URL Fetch service to issue HTTP and HTTPS requests and receive responsesUsers: a user can login to app engine in one of three methods: Google Accounts, accounts on your own Google Apps domains, or OpenID identifiers. This API to retrieve account info for userCapabilities: detect outages and scheduled downtime for specificAPI capabilities. You can use this API to reduce downtime in your application by detecting when a capability is unavailable and then bypassing it
7
8
Useful App Engine Services
Task Queue: Google App Engine introduces new method for developer to implement a background workChannel : make a persistent connection between the JavaScript client and your applicationImage: to manipulate image data using a dedicated Images serviceMail: allow sending and receiving email
9
To execute a background work
Task Queues
HTTP Post
/path/to/backgroundtask
Background task
add /path/to/backgroundtask + parameters
App Engine Task Queue service
App Engine application
API call
Task Queues demo
Allow your application to send messages to JavaScript clients in real time via a persistent connection
Channel
Browser
HTTP Request
App Engine application
Message
The JS client component: listen from connection to to receive data from serverApp Engine application :Use API to send message to connectionReceive data from client via normal HTTP request
12
Channel demo
Receiving email
Mail (cont.)
HTTP Post
incoming email
App Engine Mail service
App Engine application
incoming email
Mail demo
Provides the ability to manipulate image data like resizing, rotating, flipping, croppingInput image data is in the JPEG, PNG, GIF (including animated GIF), BMP, TIFF and ICO formats. The output format is in JPEG and PNG
Images
Images demo
19
Administration Console
Demo application: http://barcamp2011.appspot.comSource code: http://code.google.com/p/barcamp-saigon-2011-appengine-demo Its FREE to get started with App Engine:5M pageviews a monthCheck out: http://code.google.com/appengine/ Code example: http://code.google.com/p/google-app-engine-samples
Reference
Thank you
The End