Google App Engine At A Glance

2,188 views
2,064 views

Published on

Short intro to Google App Engine 4 Java

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,188
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
82
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Google App Engine At A Glance

  1. 1. Google App Engine at a glance Stefan Christoph
  2. 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. 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. 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
  5. 5. Services / Capabilities • Sandbox • Runtime Environment / Servlet Container – Java Interpreter – Read only filesystem – Memory • Data Store • Services – User authentication – URL Fetch – Mail – XMPP – Memcache – Image Manipulation – Scheduled tasks / Task Queues – Blobstore – Logging
  6. 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. 7. Development Environment • Tools – Development Server – Application lifecycle management – Eclipse plugins / Firefox plugin (GWT) – Local unit testing / debugging
  8. 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
  9. 9. GWT-RPC Client Server Framework <<interface>> <<interface>> RemoteServiceServlet ServiceDefTarget RemoteService extends extends <<interface>> related <<interface>> implements OurServiceImpl OurServiceAsync OurService implements Our stuff implements ProxyService GWT framework (autogenerated)
  10. 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. 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. 12. Logging • Java.util.logging.Logger • View in Administration Console • Download logfiles • Standard output / standard error are written to the logs
  13. 13. Local Unit Testing • LocalTestServiceHelper provides – local test environment including GAE services • Datastore • XMPP/Mail • User Management – Capability to use JUnit framework
  14. 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. 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
  16. 16. Managing Applications • Administration Console @http://appengine.google.com/a/yourdomai n.com – Application Dashboard – Multiple application versions – Analyzing log files (including admin) – Analyzing resource usage
  17. 17. Further Readings • Google App Engine documentation • GWT documentation • “Beginning Java Google App” – Kyle Roche, Jeff Douglas • “Programming Google App Engine” – Dan Sanderson

×