SlideShare a Scribd company logo
Rapid Application Development on
Google App Engine for Java
Kunal Dabir
@kdabir
github.com/kdabir
Agenda
• Introduction
• Rapid Apps – when?
• Options
• Developing on GAE/J
– Pricing
– Architecture
– What’s wrong
– Simpler way
• Demo
– Build and deploy a
simple site.
• Better Practices
• Q & A
2
About the Talk
• Level: Basic / Introductory
• Warning: There will be <code>
– Some Programming knowledge of Java/Html
• Based on my own experiences:
– Working in different web technologies and
– Cloud hosting solutions
• Takeaways :
– Get your app on cloud in a snap
– Learn a thing or two about GAE/J
3
About Me
• Programming for more than a decade
• Currently working at ThoughtWorks
• Language Enthusiast:
– Java, Groovy, Ruby, JavaScript (Node), CoffeeScript, Scala,…..
• Groovy Evangelist
• Co-Organizer / Speaker: Pune Java User Group
• More at: kunaldabir.appspot.com
4Facts as on Sept 2013 
Quick Poll - Who all:
• Do Java web apps?
• Have used Google App Engine?
• Have heard of Groovy Language?
• Understand NoSQL data store?
• Deployed an app ?
– (cloud/shared hosting /VPS/ anywhere)
• Enjoy programming?
5
Rapid App Development - When ?
• Prototyping
• Personal Pet Project
• Utility Apps
• REST API
6
Rapid App Development - When ?
• Not more than a few pages
• Data Records in thousands
• When time to market is critical
• When resources are limited
7
Options
• Google App Engine – google
• Heroku - salesforce
• CloudFoundry - vmware/spring
• OpenShift - Redhat/jboss
• dotCloud, EngineYard, Joyent, Cloudbees ....
8
Google App Engine - Benefits
• Quick to get development started
• Easy Provisioning
• No Operations
• Horizontal (Auto) Scaling
• Language Support : Python, Java, Go and PHP
9
GAE Has it all
• DataStore
• Memcache
• Blobstore
• Users API
• Channel API
• Backends
• Images API
• Logging
• Mail API
• Capabilities API
• Multitenancy
• Task Queue
• Cron Jobs
• URLFetch
• XMPP
• Static File Server
10
At High Level
11
DataStore HRD
• One for app
• Multi tennancy
• Shared between
version
App Servers
• App Code
• Auto Scaled
• Multi Versioned
Static Web
Server
• CSS/JS/HTML
• Fast Response
• Always On
Pricing
• Free to start
• Enable Paid app, get resident instance.
• A lot cheaper than competition
• 28 free instance hours $0.08 / hour
• https://cloud.google.com/pricing/
12
The Java Way - What’s Wrong?
As a java web developer:
• Puzzled with OO soup, getters setters, syntactic
noises
• Framework hell, Mix and match.
• XML noise or interspersed annotations@@@@
• Deployment ?? where ?? nothing free
13
The Java Way - What’s Wrong?
• Complex Builds
– And the Builds files (verbose, xml)
• Nested directory structure of java web
apps
• Using the SDK directly
– Or the eclipse plugin (can’t build outside
IDE)
• Ceremony and Boilerplate
14
The Java Way - What’s Wrong?
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("Hello World");
}
}
15
Enter Glide
• Easy Install
• No configuration, well almost
• No complicated directory structure
• Hot reload
• No Lock-in, export to gradle project
16
Built on Awesome technoloG’s
• Google App Engine
• Groovy
• Gaelyk
• Gradle
• Git
• GitHub
17
Gaelyk Recap - Persistence
import com.google.appengine.api.users.User
import groovyx.gaelyk.datastore.*
@Entity
class Post {
String title
String content
@Indexed Date date = new Date()
User user
}
18
Gaelyk Recap - Controller
new Post(
title: params.title,
content: params.content,
user: users.currentUser
).save()
log.info "Post Saved"
redirect "/"
19
Gaelyk Recap - Routing
get "/", forward: "/home.gtpl" , cache: 10.minutes
get "/docs/@doc", forward: "/_doc.groovy?docname=@doc"
get "/docs/", redirect: "/docs/intro"
post "/create", forward: "/_create.groovy"
all "/install", forward: "/install.html"
20
Using Glide
You need to know only three commands :
$ glide run
$ glide deploy
$ glide export
21
Configuration Files
• Only three config files, All optional
__glide.groovy
Discussed in next section
__routes.grovy
The gaelyk routes file we just saw
__build.gradle
Used to customize build. Not discussed here.
22
Configure Glide App
• Required to deploy app.
• Use the registered app-id
app {
name = "app-id"
version = "v1"
}
23
Layout Template
Sitemesh enabled by default
layout {
mappings = [
"/*": "/_layout.html"
]
}
24
Security
• Authentication
– Use ubiquitous Google id
– Or open Id (experimental)
– Can Allow only administrator
web {
security = [
'admin': ["/post/*"],
'*': ["/view/*"]
]
}
25
Demo
26
Getting more mileage
• Use CDN
• Hotlink JS Libraries, CSS and Images
• Use static landing page
• Use memcache
• Cache pages
• Enable PageSpeed
• Multiple versions
27
Trade Offs
• Performance
• Slower cold start
• Learning curve
• Difference b/w Local and Live GAE server
28
Question Answers
• Questions are guaranteed in Life, Answers
aren’t
29
Resources
• Glide :
– http://glide-gae.appspot.com
• Gaelyk :
– http://gaelyk.appspot.com
• Group:
– http://groups.google.com/forum/#!forum/glide-groovy
• Github:
– https://github.com/kdabir/glide
30

More Related Content

PPTX
Decoupled Architecture and WordPress
PDF
Drupal 7 for Government Case Study: Presentation at DrupalCamp Montreal 2012
PDF
How to Successfully Implement Headless Drupal
PDF
Serverless computing with Google Cloud
PPTX
Go on GAE (Go Israel Meetup)
PDF
Powerful Google Cloud tools for your hack (2020)
PDF
WordPress at Scale Webinar
PDF
Play Framework on Google App Engine
Decoupled Architecture and WordPress
Drupal 7 for Government Case Study: Presentation at DrupalCamp Montreal 2012
How to Successfully Implement Headless Drupal
Serverless computing with Google Cloud
Go on GAE (Go Israel Meetup)
Powerful Google Cloud tools for your hack (2020)
WordPress at Scale Webinar
Play Framework on Google App Engine

What's hot (19)

PDF
Image archive, analysis & report generation with Google Cloud
PPTX
Using GitHub Actions to Deploy your Workloads to Azure
PDF
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
PDF
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
PPTX
Super tools to boost productivity in React dev env!
PDF
GitHub Actions in action
PPT
Front-End Tools and Workflows
PDF
Devfest09 App Engine Java
PDF
Introduction to serverless computing on Google Cloud
KEY
Using Jython To Prototype Mahout Code
PDF
Lessons Learned from Building a REST API on Google App Engine
PDF
Headless Drupal: A modern approach to (micro)services and APIs
PDF
Using Grunt with Drupal
PPTX
Angular universal
PDF
Offline-First Apps with PouchDB
PPTX
Couch DB/PouchDB approach for hybrid mobile applications
PDF
Optimizing React Native views for pre-animation
PDF
Docs at Weaveworks: DX from open source to SaaS and beyond
PPTX
How we built a job board in one week with JHipster
Image archive, analysis & report generation with Google Cloud
Using GitHub Actions to Deploy your Workloads to Azure
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
Super tools to boost productivity in React dev env!
GitHub Actions in action
Front-End Tools and Workflows
Devfest09 App Engine Java
Introduction to serverless computing on Google Cloud
Using Jython To Prototype Mahout Code
Lessons Learned from Building a REST API on Google App Engine
Headless Drupal: A modern approach to (micro)services and APIs
Using Grunt with Drupal
Angular universal
Offline-First Apps with PouchDB
Couch DB/PouchDB approach for hybrid mobile applications
Optimizing React Native views for pre-animation
Docs at Weaveworks: DX from open source to SaaS and beyond
How we built a job board in one week with JHipster
Ad

Similar to Rapid Application Development on Google App Engine for Java (20)

PPTX
Google appenginejava.ppt
PPT
Google App Engine for Java
PPT
Developing Java Web Applications In Google App Engine
KEY
Google App Engine Java, Groovy and Gaelyk
PPT
Google App Engine - Java Style
PDF
Google App Engine (Introduction)
PDF
Google App Engine for Java
PPTX
Deploying applications to Cloud with Google App Engine
PDF
Google App Engine JAX PaaS Parade 2013
PPTX
Google Cloud Platform
PDF
Java Support On Google App Engine
PDF
Developing, deploying and monitoring Java applications using Google App Engine
PDF
Google App Engine for Java v0.0.2
PPTX
Webtech googleapps
PDF
Google Developer Days Brazil 2009 - Java Appengine
PDF
Google App Engine
PPT
Google App Engine for Java (GAE/J)
PPT
04/2010 - Google App Engine
PPT
Google app engine
PDF
Google app-engine-cloudcamplagos2011
Google appenginejava.ppt
Google App Engine for Java
Developing Java Web Applications In Google App Engine
Google App Engine Java, Groovy and Gaelyk
Google App Engine - Java Style
Google App Engine (Introduction)
Google App Engine for Java
Deploying applications to Cloud with Google App Engine
Google App Engine JAX PaaS Parade 2013
Google Cloud Platform
Java Support On Google App Engine
Developing, deploying and monitoring Java applications using Google App Engine
Google App Engine for Java v0.0.2
Webtech googleapps
Google Developer Days Brazil 2009 - Java Appengine
Google App Engine
Google App Engine for Java (GAE/J)
04/2010 - Google App Engine
Google app engine
Google app-engine-cloudcamplagos2011
Ad

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Approach and Philosophy of On baking technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
cuic standard and advanced reporting.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Big Data Technologies - Introduction.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
MIND Revenue Release Quarter 2 2025 Press Release
Chapter 3 Spatial Domain Image Processing.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Review of recent advances in non-invasive hemoglobin estimation
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
sap open course for s4hana steps from ECC to s4
Mobile App Security Testing_ A Comprehensive Guide.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Approach and Philosophy of On baking technology
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
Empathic Computing: Creating Shared Understanding
Reach Out and Touch Someone: Haptics and Empathic Computing
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Big Data Technologies - Introduction.pptx
The AUB Centre for AI in Media Proposal.docx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx

Rapid Application Development on Google App Engine for Java

  • 1. Rapid Application Development on Google App Engine for Java Kunal Dabir @kdabir github.com/kdabir
  • 2. Agenda • Introduction • Rapid Apps – when? • Options • Developing on GAE/J – Pricing – Architecture – What’s wrong – Simpler way • Demo – Build and deploy a simple site. • Better Practices • Q & A 2
  • 3. About the Talk • Level: Basic / Introductory • Warning: There will be <code> – Some Programming knowledge of Java/Html • Based on my own experiences: – Working in different web technologies and – Cloud hosting solutions • Takeaways : – Get your app on cloud in a snap – Learn a thing or two about GAE/J 3
  • 4. About Me • Programming for more than a decade • Currently working at ThoughtWorks • Language Enthusiast: – Java, Groovy, Ruby, JavaScript (Node), CoffeeScript, Scala,….. • Groovy Evangelist • Co-Organizer / Speaker: Pune Java User Group • More at: kunaldabir.appspot.com 4Facts as on Sept 2013 
  • 5. Quick Poll - Who all: • Do Java web apps? • Have used Google App Engine? • Have heard of Groovy Language? • Understand NoSQL data store? • Deployed an app ? – (cloud/shared hosting /VPS/ anywhere) • Enjoy programming? 5
  • 6. Rapid App Development - When ? • Prototyping • Personal Pet Project • Utility Apps • REST API 6
  • 7. Rapid App Development - When ? • Not more than a few pages • Data Records in thousands • When time to market is critical • When resources are limited 7
  • 8. Options • Google App Engine – google • Heroku - salesforce • CloudFoundry - vmware/spring • OpenShift - Redhat/jboss • dotCloud, EngineYard, Joyent, Cloudbees .... 8
  • 9. Google App Engine - Benefits • Quick to get development started • Easy Provisioning • No Operations • Horizontal (Auto) Scaling • Language Support : Python, Java, Go and PHP 9
  • 10. GAE Has it all • DataStore • Memcache • Blobstore • Users API • Channel API • Backends • Images API • Logging • Mail API • Capabilities API • Multitenancy • Task Queue • Cron Jobs • URLFetch • XMPP • Static File Server 10
  • 11. At High Level 11 DataStore HRD • One for app • Multi tennancy • Shared between version App Servers • App Code • Auto Scaled • Multi Versioned Static Web Server • CSS/JS/HTML • Fast Response • Always On
  • 12. Pricing • Free to start • Enable Paid app, get resident instance. • A lot cheaper than competition • 28 free instance hours $0.08 / hour • https://cloud.google.com/pricing/ 12
  • 13. The Java Way - What’s Wrong? As a java web developer: • Puzzled with OO soup, getters setters, syntactic noises • Framework hell, Mix and match. • XML noise or interspersed annotations@@@@ • Deployment ?? where ?? nothing free 13
  • 14. The Java Way - What’s Wrong? • Complex Builds – And the Builds files (verbose, xml) • Nested directory structure of java web apps • Using the SDK directly – Or the eclipse plugin (can’t build outside IDE) • Ceremony and Boilerplate 14
  • 15. The Java Way - What’s Wrong? import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("Hello World"); } } 15
  • 16. Enter Glide • Easy Install • No configuration, well almost • No complicated directory structure • Hot reload • No Lock-in, export to gradle project 16
  • 17. Built on Awesome technoloG’s • Google App Engine • Groovy • Gaelyk • Gradle • Git • GitHub 17
  • 18. Gaelyk Recap - Persistence import com.google.appengine.api.users.User import groovyx.gaelyk.datastore.* @Entity class Post { String title String content @Indexed Date date = new Date() User user } 18
  • 19. Gaelyk Recap - Controller new Post( title: params.title, content: params.content, user: users.currentUser ).save() log.info "Post Saved" redirect "/" 19
  • 20. Gaelyk Recap - Routing get "/", forward: "/home.gtpl" , cache: 10.minutes get "/docs/@doc", forward: "/_doc.groovy?docname=@doc" get "/docs/", redirect: "/docs/intro" post "/create", forward: "/_create.groovy" all "/install", forward: "/install.html" 20
  • 21. Using Glide You need to know only three commands : $ glide run $ glide deploy $ glide export 21
  • 22. Configuration Files • Only three config files, All optional __glide.groovy Discussed in next section __routes.grovy The gaelyk routes file we just saw __build.gradle Used to customize build. Not discussed here. 22
  • 23. Configure Glide App • Required to deploy app. • Use the registered app-id app { name = "app-id" version = "v1" } 23
  • 24. Layout Template Sitemesh enabled by default layout { mappings = [ "/*": "/_layout.html" ] } 24
  • 25. Security • Authentication – Use ubiquitous Google id – Or open Id (experimental) – Can Allow only administrator web { security = [ 'admin': ["/post/*"], '*': ["/view/*"] ] } 25
  • 27. Getting more mileage • Use CDN • Hotlink JS Libraries, CSS and Images • Use static landing page • Use memcache • Cache pages • Enable PageSpeed • Multiple versions 27
  • 28. Trade Offs • Performance • Slower cold start • Learning curve • Difference b/w Local and Live GAE server 28
  • 29. Question Answers • Questions are guaranteed in Life, Answers aren’t 29
  • 30. Resources • Glide : – http://glide-gae.appspot.com • Gaelyk : – http://gaelyk.appspot.com • Group: – http://groups.google.com/forum/#!forum/glide-groovy • Github: – https://github.com/kdabir/glide 30