Java Support On Google App Engine
-
Upload
xebia-it-architects -
Category
Technology
-
view
5.148 -
download
4
description
Transcript of Java Support On Google App Engine
![Page 1: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/1.jpg)
Java Applications on Google App Engine
Narinder Kumar
www.xebiaindia.com
![Page 2: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/2.jpg)
Easy to build, easy to maintain, easy to scale
![Page 3: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/3.jpg)
Current Web Application LifeCycle Management
➢ Prepare➢ Deploy➢ Scale➢ Maintain / Monitor➢ Upgrade
Difficult and Expensive
![Page 4: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/4.jpg)
Google App Engine ?
![Page 5: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/5.jpg)
What is Google App Engine➢ Yet another Cloud Computing Platform➢ Hosts your Web Applications on Google
Infrastructure➢ Formally launched in April'08 with Python➢ Java Support enabled in April'09
![Page 6: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/6.jpg)
Java on Google App Engine➢ Platform as a Service (PaaS)
➢ Hardware, Connectivity➢ Operating System➢ JVM➢ Servlet Container➢ SDK➢ API's for accessing Google Infrastructure
Services
![Page 7: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/7.jpg)
Key Features➢ No need to install or maintain your own stack
➢ Scaling on Demand
➢ Google's proven infrastructure for you
➢ Pay as you Go, Free to get started
![Page 8: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/8.jpg)
Architecture
![Page 9: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/9.jpg)
Typical Application Building Blocks
Industry Standard APIs : JPA/JDO, JCache,JavaMail
Google Specific API Interfaces
Google Infrastructure
![Page 10: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/10.jpg)
Platform➢ JVM 5 or later➢ Servlet 2.5 Container, Jetty & Jasper (can
change)➢ HTTP Session➢ JSP
➢ SandBox Environment➢ Google Services API
![Page 11: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/11.jpg)
Getting Started➢ Google Account & Mobile Phone
➢ Download and install SDK
➢ Plugin for your IDE / Command Line
![Page 12: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/12.jpg)
DEMO OF HELLO-WORLD
![Page 13: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/13.jpg)
Summary➢ SDK includes
➢ Dev AppServer➢ Disk based version of DataStore➢ Simulation of Google User Service
➢ Deployment➢ https://appengine.google.com➢ Application hosted at <app-id>.appspot.com or
Custom Domain
![Page 14: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/14.jpg)
Configuration➢ appengine-web.xml
➢ Application Name and Version➢ Logger➢ Static Files➢ Resource Files➢ System Properties & Environment Variables➢ SSL➢ Session➢ Inbound Services
![Page 15: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/15.jpg)
Data Manipulation➢ Underlying Storage is BigTable➢ JDO or JPA or DataStore API➢ JDO & JPA implemention by DataNucleus
Access Platform➢ jdoconfig.xml or persistence.xml➢ datastore-indexes.xml
Let's try with a simple scenario
![Page 16: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/16.jpg)
Data Manipulation Constraints➢ Max 1000 rows per request➢ Not Allowed while Using JPA
➢ Owned Many-to-many relations➢ Join, group by, having...
➢ Only JOINED and MAPPED_SUPERCLASS during Inheritance
➢ Restrictions on Queries
![Page 17: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/17.jpg)
RDBMS vs DataStoreRDBMS DATASTORE
DataBase DataStoreTable KindRow EntityRow ID KeyColumn Property
JPA JDO@Entity @PersistanceCapa
ble@Id @PrimaryKey@GeneratedValue
@Persistent
find(...) getObjectById(...)
![Page 18: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/18.jpg)
Other Google Services➢ URL Fetch➢ Memcache➢ User Service➢ Mail➢ Image➢ XMPP
![Page 19: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/19.jpg)
Additional Services➢ Cron
➢ AOP Like Interface
➢ Task Queues
![Page 20: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/20.jpg)
Managing & Monitoring➢ Dashboard
➢ Reporting
➢ Manage different versions
➢ Logs
![Page 21: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/21.jpg)
Developer's Toolkit➢ IDE Plugins➢ Ant supported, Maven on the way➢ Testing Facilities➢ XML Validation
![Page 22: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/22.jpg)
Quotas & Billing➢ Billable Quotas & Fixed Quotas➢ Per-minute Quotas➢ Resources
➢ Requests➢ CPU➢ Bandwidth (In/Out)➢ Google Services
![Page 23: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/23.jpg)
Current Pricing➢ Very Generous ➢ CPU : 6.5 hours / day, $0.10 / hour later➢ Bandwidth In/Out : 1 GB / day, $0.10/$0.12
GB later➢ Stored Data : 1 GB➢ Emails : 2000/day
![Page 24: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/24.jpg)
How to Manage / Monitor Costs➢ QuotaService
➢ Profiling Tool
➢ Application behaviour when Resources are
finished
➢ AdminConsole
![Page 25: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/25.jpg)
Constraints➢ Restricted JVM
➢ Threads➢ File System Writes➢ ClassLoader, JNI,...
➢ Read Only File System➢ DataStore : Only choice for persistence➢ Requests limited to max 30 seconds
![Page 26: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/26.jpg)
Limitations➢ No Server Push
➢ Request & Response Size Max 10 MB
➢ Max Files < 3000
➢ Max Size of Application Files < 150 MB
![Page 27: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/27.jpg)
Supported Languages & Frameworks
➢ Groovy & Grails ➢ JRuby on Rails (with some build and config modifications)
➢ Scala & Lift (no Scala Actors)
➢ Wicket➢ Blaze-DS➢ Struts,...
![Page 28: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/28.jpg)
Powered By Google App Engine
![Page 29: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/29.jpg)
Competitors➢ SaaS / PaaS / IaaS
➢ Azure Sevices
➢ Force.com
➢ Amazon Web Service
![Page 30: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/30.jpg)
![Page 31: Java Support On Google App Engine](https://reader033.fdocuments.in/reader033/viewer/2022042613/54c2e7dc4a795929468b471c/html5/thumbnails/31.jpg)
References & Credits➢ Of-course Google
(http://code.google.com/appengine/)
➢ Google IO 2009 Sessions
➢ Dzone RefCardz