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

What's hot

Image archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google CloudImage archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google Cloud
wesley chun
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloud
wesley chun
 
Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to Azure
Kasun Kodagoda
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
wesley chun
 
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHEREECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
ECS19 - Daniel Neumann - AZURE FUNCTIONS 2.0 - RUNNING SERVERLESS EVERYWHERE
European Collaboration Summit
 
Super tools to boost productivity in React dev env!
Super tools to boost productivity in React dev env!Super tools to boost productivity in React dev env!
Super tools to boost productivity in React dev env!
Souvik Basu
 
GitHub Actions in action
GitHub Actions in actionGitHub Actions in action
GitHub Actions in action
Oleksii Holub
 
Front-End Tools and Workflows
Front-End Tools and WorkflowsFront-End Tools and Workflows
Front-End Tools and Workflows
Sara Vieira
 
Devfest09 App Engine Java
Devfest09  App Engine  JavaDevfest09  App Engine  Java
Devfest09 App Engine Java
Chris Schalk
 
Introduction to serverless computing on Google Cloud
Introduction to serverless computing on Google CloudIntroduction to serverless computing on Google Cloud
Introduction to serverless computing on Google Cloud
wesley chun
 
Using Jython To Prototype Mahout Code
Using Jython To Prototype Mahout CodeUsing Jython To Prototype Mahout Code
Using Jython To Prototype Mahout Code
async_io
 
Lessons Learned from Building a REST API on Google App Engine
Lessons Learned from Building a REST API on Google App EngineLessons Learned from Building a REST API on Google App Engine
Lessons Learned from Building a REST API on Google App Engine
async_io
 
Headless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIsHeadless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIs
sparkfabrik
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupal
arithmetric
 
Angular universal
Angular universalAngular universal
Angular universal
Michael Haberman
 
Offline-First Apps with PouchDB
Offline-First Apps with PouchDB Offline-First Apps with PouchDB
Offline-First Apps with PouchDB
Paula Peña (She, Her, Hers)
 
Couch DB/PouchDB approach for hybrid mobile applications
Couch DB/PouchDB approach for hybrid mobile applicationsCouch DB/PouchDB approach for hybrid mobile applications
Couch DB/PouchDB approach for hybrid mobile applications
Ihor Malytskyi
 
Optimizing React Native views for pre-animation
Optimizing React Native views for pre-animationOptimizing React Native views for pre-animation
Optimizing React Native views for pre-animation
ModusJesus
 
Docs at Weaveworks: DX from open source to SaaS and beyond
Docs at Weaveworks: DX from open source to SaaS and beyondDocs at Weaveworks: DX from open source to SaaS and beyond
Docs at Weaveworks: DX from open source to SaaS and beyond
Luke Marsden
 
How we built a job board in one week with JHipster
How we built a job board in one week with JHipsterHow we built a job board in one week with JHipster
How we built a job board in one week with JHipster
Kile Niklawski
 

What's hot (20)

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

Similar to Rapid Application Development on Google App Engine for Java

Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
Guillaume Laforge
 
Infinite Scale - Introduction to Google App Engine
Infinite Scale - Introduction to Google App EngineInfinite Scale - Introduction to Google App Engine
Infinite Scale - Introduction to Google App Engine
Marian Borca
 
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011Gaelyk update - Guillaume Laforge - SpringOne2GX 2011
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011
Guillaume Laforge
 
Google App Engine for PHP
Google App Engine for PHP Google App Engine for PHP
Google App Engine for PHP
Eric Johnson
 
Google App Engine for Developers
Google App Engine for DevelopersGoogle App Engine for Developers
Google App Engine for Developers
Lynn Langit
 
Building JavaScript
Building JavaScriptBuilding JavaScript
Building JavaScript
Brady Clifford
 
Gaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume LaforgeGaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume LaforgeGuillaume Laforge
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
wesley chun
 
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
Igalia
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)
wesley chun
 
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdfAstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
FarHanWasif1
 
Powerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackPowerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hack
wesley chun
 
Google Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG BelgaumGoogle Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG Belgaum
sandeephegde
 
DEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in DominoDEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
Heiko Voigt
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
wesley chun
 
Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?
Weng Wei
 
Lesson 1. Create project Sunshine
Lesson 1. Create project SunshineLesson 1. Create project Sunshine
Lesson 1. Create project Sunshine
Chanhyeong LEE
 
appengine ja night #25 Google App Engine for PHP (English)
appengine ja night #25 Google App Engine for PHP (English)appengine ja night #25 Google App Engine for PHP (English)
appengine ja night #25 Google App Engine for PHP (English)
Ryo Yamasaki
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
Andy_Gaskell
 
Extending WordPress as a pro
Extending WordPress as a proExtending WordPress as a pro
Extending WordPress as a pro
Marko Heijnen
 

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

Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Infinite Scale - Introduction to Google App Engine
Infinite Scale - Introduction to Google App EngineInfinite Scale - Introduction to Google App Engine
Infinite Scale - Introduction to Google App Engine
 
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011Gaelyk update - Guillaume Laforge - SpringOne2GX 2011
Gaelyk update - Guillaume Laforge - SpringOne2GX 2011
 
Google App Engine for PHP
Google App Engine for PHP Google App Engine for PHP
Google App Engine for PHP
 
Google App Engine for Developers
Google App Engine for DevelopersGoogle App Engine for Developers
Google App Engine for Developers
 
Building JavaScript
Building JavaScriptBuilding JavaScript
Building JavaScript
 
Gaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume LaforgeGaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume Laforge
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
 
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)
 
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdfAstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
 
Powerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackPowerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hack
 
Google Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG BelgaumGoogle Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG Belgaum
 
DEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in DominoDEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
DEV117 - Unleash the Power of the AppDev Pack and Node.js in Domino
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?
 
Lesson 1. Create project Sunshine
Lesson 1. Create project SunshineLesson 1. Create project Sunshine
Lesson 1. Create project Sunshine
 
appengine ja night #25 Google App Engine for PHP (English)
appengine ja night #25 Google App Engine for PHP (English)appengine ja night #25 Google App Engine for PHP (English)
appengine ja night #25 Google App Engine for PHP (English)
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
 
Extending WordPress as a pro
Extending WordPress as a proExtending WordPress as a pro
Extending WordPress as a pro
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 

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