2. Introduction
• PaaS
• Running own Apps in Google infrastructure
• Supports different runtime environments
– Java ( JRE 6 with limitations, standard APIs like
JDO, JPA, JavaMail)
– Python ( 2.5.2, standard library)
• App runs in sandbox
• Automatic scaling and load balancing
3. Architecture - Overview
Internet
Internet
http://<version>.<appid>.appspot.com/some/path
Loadbalancer
Frontend … Frontend
Static File Server … Static File Server Application Server … Application Server
static files resource files program files
static files resource files program files
4. Architecture - Application Server
URLFetcher
Application
Mail
Internet
Internet
XMPP
Application sandbox /Runtime Environment
External Services
Authentication
Memcache
Datastore
Blobstore
Logging
Image
Tasks
Internal Services
Google App Engine
Bigtable memcache
Google Infrastructure
6. Limitations
• Programming Model
– Application runs in sandbox and can not
• Write to filesystem
• Make arbitary network connections
• Use multiple threads/processes
• Perform long-lasting processing
• Permissions
• Know about other instances/applications
– Sandbox restrictions are implemented as JVM
• Quotas (Requests, In/Out bandwidth, CPU time, API calls)
– Billable Quotas
• Set by the application owner to keep in budget
– Fixed Quotas
• Set by GAE to ensure integrity of the system
7. Development Environment
• Tools
– Development Server
– Application lifecycle management
– Eclipse plugins / Firefox plugin (GWT)
– Local unit testing / debugging
8. Deployment Environment
• Application is deployed as war which contains:
– Static files
– Resource Files
– Program Files
– Deployment Descriptor
• Rich Admin web console
• Deployment is integrated in IDE
• Deploy multiple version of the application at
the same time
10. App Engine Datastore
Entity
key “data”
Application ID Property *
Kind name Value *
ID / Name
• Non-relational Data- • Distribution, replication,
store load balancing behind
• Stores data as entities the scene
• APIs: • Based on Bigtable / GFS
– JDO / JPA
– Low Level API
11. Using Email/XMPP
• Create Servlet for handling incoming
messages
• Ensure proper url configuration ins
deployment descriptor
• Configure as inbound service
• XMPP
– implementation supports no Group Chat
– App-id@appspot.com /
anything@version.latest.app-id.appspotchat.com
12. Logging
• Java.util.logging.Logger
• View in Administration Console
• Download logfiles
• Standard output / standard error are written
to the logs
13. Local Unit Testing
• LocalTestServiceHelper provides
– local test environment including GAE services
• Datastore
• XMPP/Mail
• User Management
– Capability to use JUnit framework
14. Memcache Service
• Distributed in memory cache
• Configurable expiration time but
• Unreliable might be vanished at any time
• Supported Interfaces :
– JACHE (JSR 107: JCACHE – Java Temporary
Caching API)
– The Low-Level Memcache API (documentation)
15. User Management – Google Accounts
• Optional feature
• Utilize Google Authentication system in your
own application -> focus on business logic
• Access to Google account data -> email, id
• Access constraints based on roles
– Declarative in deployment descriptor (URL
based)
– programmatically
17. Further Readings
• Google App Engine documentation
• GWT documentation
• “Beginning Java Google App” – Kyle Roche,
Jeff Douglas
• “Programming Google App Engine” – Dan
Sanderson