Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
DEPLOYING APPLICATIONS 
TO CLOUD
ABOUT ME 
 Alexander Zamkovyi 
Java Developer @ Intro Pro 
Linked[in]: ua.linkedin.com/in/invaa/ 
e-mail: alex@zamkovyi.n...
GOOGLE APP ENGINE 
 Part of Google Cloud Platform (trusted by 4 million applications) 
 Platform-as-a-Service (Java, Pyt...
REASONS TO LEARN GOOGLE APP ENGINE 
 Highly scalable 
 Integration 
 Cost-effective 
 Well documented 
 It’s Google
CLOUD, CLOUD, CLOUD!
PLAN 
 Google Cloud Endpoints 
 Google App Engine Development Process 
 Deployment and Troubleshooting 
 Persistence 
...
GOOGLE CLOUD ENDPOINTS
GOOGLE CLOUD ENDPOINTS
THE SANDBOX 
 Java 7 JVM in a safe "sandboxed" environment 
 Servlet 2.5 standard 
 Standard WAR directory structure 
...
DEMO (CLOUD ENDPOINTS) 
Web frontend 
 Deployed: https://cloudendpointstic.appspot.com 
 Sources: https://github.com/Goo...
DEMO (CLOUD ENDPOINTS) 
Android client 
 Deployed: 
https://play.google.com/store/apps/details?id=com.devrel.sa 
mples.tt...
DEVELOPMENT PROCESS
REQUIREMENTS AND PREREQUISITES 
 JDK 1.7 (recommended) 
 Apache Maven 3.1+ 
 MySQL 5+ (for local dev server) 
 Google ...
GAE JAVA PROJECT STRUCTURE 
 You'll add your own application Java classes 
to src/main/java/... 
 You'll configure your ...
THE JAVA DEVELOPMENT SERVER 
 jetty-6.1.x (built-in) 
 The development web server simulates the App Engine Java runtime ...
ADMIN CONSOLE 
 http://localhost:port/_ah/admin
DEPLOYMENT AND 
TROUBLESHOOTING
UPLOADING APP 
 mvn appengine:update
DEVELOPER'S CONSOLE 
 https://console.developers.google.com/
APPCFG 
 appcfg.cmd 
[options] 
<action> 
<war-location>
PERSISTENCE
DATASTORE AND RDBMS
DEMO (CLOUD DATASTORE AND CLOUD SQL) 
Calendar app 
Features: 
 JPA (Cloud SQL vs Cloud Datastores) 
 Spring MVC 
 jQue...
LIMITATIONS
AN APP ENGINE APPLICATION CANNOT 
 write to the filesystem. Applications must use the App Engine datastore for 
storing p...
WEB.XML FEATURES NOT SUPPORTED 
 App Engine supports the <load-on-startup> element for servlet declarations. 
However, th...
JPA FEATURES NOT SUPPORTED 
 Owned many-to-many relationships 
 "Join" queries. You cannot use a field of a child entity...
JRE WHITE LIST
Q&A 
ua.linkedin.com/in/invaa/ 
alex@zamkovyi.name
Deploying applications to Cloud with Google App Engine
Upcoming SlideShare
Loading in …5
×

Deploying applications to Cloud with Google App Engine

1,222 views

Published on

Overview of Google App Engine features for developing web applications and rest api.

Published in: Software
  • Be the first to comment

Deploying applications to Cloud with Google App Engine

  1. 1. DEPLOYING APPLICATIONS TO CLOUD
  2. 2. ABOUT ME  Alexander Zamkovyi Java Developer @ Intro Pro Linked[in]: ua.linkedin.com/in/invaa/ e-mail: alex@zamkovyi.name
  3. 3. GOOGLE APP ENGINE  Part of Google Cloud Platform (trusted by 4 million applications)  Platform-as-a-Service (Java, Python, PHP, Go)  264k websites (258k is active), according to builtwith.com  Coca-cola, Snapchat, Ubisoft, Rovio, BestBuy, Sony Music, ...
  4. 4. REASONS TO LEARN GOOGLE APP ENGINE  Highly scalable  Integration  Cost-effective  Well documented  It’s Google
  5. 5. CLOUD, CLOUD, CLOUD!
  6. 6. PLAN  Google Cloud Endpoints  Google App Engine Development Process  Deployment and Troubleshooting  Persistence  Limitations
  7. 7. GOOGLE CLOUD ENDPOINTS
  8. 8. GOOGLE CLOUD ENDPOINTS
  9. 9. THE SANDBOX  Java 7 JVM in a safe "sandboxed" environment  Servlet 2.5 standard  Standard WAR directory structure  Secured "sandbox" environment isolates application for service and security  The JVM can execute any Java bytecode that operates within the sandbox restrictions
  10. 10. DEMO (CLOUD ENDPOINTS) Web frontend  Deployed: https://cloudendpointstic.appspot.com  Sources: https://github.com/GoogleCloudPlatform
  11. 11. DEMO (CLOUD ENDPOINTS) Android client  Deployed: https://play.google.com/store/apps/details?id=com.devrel.sa mples.ttt  Sources: https://github.com/GoogleCloudPlatform
  12. 12. DEVELOPMENT PROCESS
  13. 13. REQUIREMENTS AND PREREQUISITES  JDK 1.7 (recommended)  Apache Maven 3.1+  MySQL 5+ (for local dev server)  Google account  Application ID  IDE
  14. 14. GAE JAVA PROJECT STRUCTURE  You'll add your own application Java classes to src/main/java/...  You'll configure your application using the file src/main/webapp/WEB-INF/appengine.web.xml  You'll configure your application deployment using the file src/main/webapp/WEB-INF/web.xml
  15. 15. THE JAVA DEVELOPMENT SERVER  jetty-6.1.x (built-in)  The development web server simulates the App Engine Java runtime environment and all of its services, including the datastore
  16. 16. ADMIN CONSOLE  http://localhost:port/_ah/admin
  17. 17. DEPLOYMENT AND TROUBLESHOOTING
  18. 18. UPLOADING APP  mvn appengine:update
  19. 19. DEVELOPER'S CONSOLE  https://console.developers.google.com/
  20. 20. APPCFG  appcfg.cmd [options] <action> <war-location>
  21. 21. PERSISTENCE
  22. 22. DATASTORE AND RDBMS
  23. 23. DEMO (CLOUD DATASTORE AND CLOUD SQL) Calendar app Features:  JPA (Cloud SQL vs Cloud Datastores)  Spring MVC  jQuery  Deployed: http://cloudcalendarservice.appspot.com/  Sources: https://github.com/invaa/CloudCalendar
  24. 24. LIMITATIONS
  25. 25. AN APP ENGINE APPLICATION CANNOT  write to the filesystem. Applications must use the App Engine datastore for storing persistent data. Reading from the filesystem is allowed, and all application files uploaded with the application are available  respond slowly. A web request to an application must be handled within a few seconds. Processes that take a very long time to respond are terminated to avoid overloading the web server  make other kinds of system calls
  26. 26. WEB.XML FEATURES NOT SUPPORTED  App Engine supports the <load-on-startup> element for servlet declarations. However, the load actually occurs during the first request handled by the web server instance, not prior to it  Some deployment descriptor elements can take a human readable display name, description and icon for use in IDEs. App Engine doesn't use these, and ignores them  App Engine doesn't support JNDI environment variables (<env-entry>)  App Engine doesn't support EJB resources (<resource-ref>)  Notification of the destruction of servlets, servlet context, or filters is not supported  The <distributable> element is ignored  Servlet scheduling with <run-at> is not supported
  27. 27. JPA FEATURES NOT SUPPORTED  Owned many-to-many relationships  "Join" queries. You cannot use a field of a child entity in a filter when performing a query on the parent kind. Note that you can test the parent's relationship field directly in a query using a key  Aggregation queries (group by, having, sum, avg, max, min)  Polymorphic queries. You cannot perform a query of a class to get instances of a subclass. Each class is represented by a separate entity kind in the datastore
  28. 28. JRE WHITE LIST
  29. 29. Q&A ua.linkedin.com/in/invaa/ alex@zamkovyi.name

×