SlideShare a Scribd company logo
GAE Overview
Moch Nasrullah R
Samsung R&D Institute Indonesia
(SRIN)
November 2013
As presented at:
Agenda
•
•
•
•

Cloud Computing
GAE Overview
GAE/J Overview
GAE/J Getting Started
Cloud Computing
Cloud Services

Cloud Clients
(Web browser, Desktop App,
Mobile App, embeded, ...)
http://upload.wikimedia.org/wikipedia/commons/b/b5/Cloud_computing.svg
Cloud classification
Software as a Service (SaaS)

Application:
-Web Apps
-Desktop Apps
-Mobile Apps
(Google Apps, Google Translate, Office
360, NetSuite, IBM Lotus Live, GitHub)

Platform as a Service (PaaS)

Development Platform + Runtime Tools +
Environment
(Google App Engine, Heroku, Windows
Azure, force.com, Rollbase)

Infrastructure as a Service (IaaS)

CPU
Networks
Data Storage
(AWS, VM Ware, Joyent, Rackspace)
Google App Engine
• run your web applications on Google's
infrastructure
– Google handles the maintenance infrasturcture:
hardware failures, security patches, OS upgrades

• Free ... within quota
GAE Limits & Quota
•
•
•
•

10 Apps per user
5 Mio pageview free per month
6.5 hours of CPU and 1 Gb in & out traffic
https://developers.google.com/appengine/do
cs/quotas
Why GAE
• Easy to build
– Language support (Java, Python, GO, PHP)
– Automatic scaling & load balancing

• Easy to maintain
– Web based admin dashboard

• Easy to scale (traffic & data storage)
– GAE Datastore
– Google Cloud SQL
– Google Cloud Storage
GAE/J Overview

developers.google.com/appengine/docs/java/
Let’s give it a try
• Follow the getting started in link below:
•

https://developers.google.com/appengine/docs/java/gettingstarted/introduction
Run Eclipse after Installing JDK
Installing Plugin

https://developers.google.com/eclipse/docs/install-eclipse-4.3
Install from zip
Creating Project
Configure SDK

Directory where
Appengine extracted
The Servlet Class
package guestbook;
import java.io.IOException;
import javax.servlet.http.*;
public class GuestbookServlet extends HttpServlet {
public void doGet(HttpServletRequest req,
HttpServletResponse resp)
throws IOException {
resp.setContentType("text/plain");
resp.getWriter().println("Hello, world");
}
}
Project Structure
Java source code
other configuration

JARs for libraries

app configuration
JSPs, images, data files
Running Application
Preparation for deployment
• Register to Google App Engine
• Create an Application
• Deploy via Eclipse
Register to App Engine
• Register at: https://appengine.google.com/
• Create an Application
Create an Application
• For now, just fill in ‘Application Identifier’ and ‘Application
Title’, than accept ‘Term of Service’
Problem when Deploying

• Adding VM config
o Open eclipse.ini in the eclipse folder
o Add below lines before -vmargs
-vm
C:Javajdk1.7.0_40binjavaw.exe
Adding VM config
•
•
•
•

Open eclipse.ini in the eclipse folder
Add below lines before -vmargs
-vm
C:Javajdk1.7.0_40binjavaw.exe
Sign in to Deploy
Setting App ID & Version

Input Application Identifier
registered at appspot.com
Refactor Example to MVC
• Using JSP as View template
– JSP files will resides inside ‘WEB-INF/jsp’ folder
– So users can not access our template directly

• Using Servlet as Controller
– Put model in request attribute
– Forward to proper View
– Change SignGuestbookServlet.java so it redirect to
servlet (not JSP):
resp.sendRedirect("/guestbook?guestbookName=" + guestbookName);
GuestbookServlet.java – doGet()
UserService userService = UserServiceFactory.getUserService();
User user = userService.getCurrentUser();

String signUrl = "";
String userNickname = "";
if (user!=null) {
signUrl = userService.createLogoutURL(req.getRequestURI());
userNickname = user.getNickname();
} else {
signUrl = userService.createLoginURL(req.getRequestURI());
}

Login or Logout URL

String guestbookName = req.getParameter("guestbookName");
if (guestbookName == null) {
guestbookName = "default";
}

Retrieve data from

DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
datastore
Key guestbookKey = KeyFactory.createKey("Guestbook", guestbookName);
Query query = new Query("Greeting", guestbookKey).addSort("date", Query.SortDirection.DESCENDING);
List<Entity> greetings = datastore.prepare(query).asList(FetchOptions.Builder.withLimit(5));
// put data tobe displayed in JSP
req.setAttribute("signUrl", signUrl);
req.setAttribute("userNickname", userNickname);
req.setAttribute("guestbookName", guestbookName);
req.setAttribute("greetingList", greetings);

Put data in Request
Attribute

String templateFile = "/WEB-INF/jsp/guestbook.jsp";
RequestDispatcher rd = getServletContext().getRequestDispatcher(templateFile);
rd.forward(req, resp);

Forward to View
/WEB-INF/jsp/guestbook.jsp
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

Taglib

<html>
<head>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
</head>
<body>
<c:if test="${userNickname!=''}">
<p>Hello, ${fn:escapeXml(userNickname)}! (You can <a href="${signUrl}">sign
out</a>.)</p>
Say proper hello to
</c:if>
sign in user
<c:if test="${userNickname==''}">
<p>Hello!
<a href="${signUrl}">Sign in</a> to include your name with greetings you post.</p>
</c:if>
<c:if test="${empty greetingList}">
<p>Guestbook '${fn:escapeXml(guestbookName)}' has no messages.</p>
</c:if>
<c:if test="${not empty greetingList}">
<p>Messages in Guestbook '${fn:escapeXml(guestbookName)}'.</p>
</c:if>
/WEB-INF/jsp/guestbook.jsp
Iterate Greeting List
<c:forEach items="${greetingList}" var="greeting">
Passed from Servlet
<c:if test="${not empty greeting.properties['user']}">
<p><b>${fn:escapeXml(greeting.properties['user'].nickname)}</b> wrote:</p>
</c:if>
<c:if test="${empty greeting.properties['user']}">
<p>An anonymous person wrote:</p>
</c:if>
<blockquote>${fn:escapeXml(greeting.properties['content'])}</blockquote>
</c:forEach>
Form same as
previous

<form action="/sign" method="post">
<div><textarea name="content" rows="3" cols="60"></textarea></div>
<div><input type="submit" value="Post Greeting" /></div>
<input type="hidden" name="guestbookName"
value="${fn:escapeXml(guestbookName)}"/>
</form>

</body>
</html>
Maybe Next Time
• Using Guice in GAE/J
• Using GAE Python
Reference
• http://www.slideshare.net/dimityrdanailov/google-app-enginevarna-lab-19062013
• http://www.slideshare.net/LarsVogel/google-app-engine-for-java7698966
• http://www.google.com/events/io/2009/sessions.html#appengine
• http://www.google.com/events/io/2010/sessions.html#App%20Eng
ine
• http://www.google.com/events/io/2011/sessions.html#appengine-track
• https://developers.google.com/events/io/2012/sessions#cloudplatform
• https://developers.google.com/events/io/2013/sessions#t-googlecloud-platform
• https://developers.google.com/appengine/
Thanks
• SRIN Members
About
• https://sites.google.com/site/meetnasrul/
Ad

More Related Content

What's hot (18)

How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014
Puppet
 
MongoDB Days UK: Run MongoDB on Google Cloud Platform
MongoDB Days UK: Run MongoDB on Google Cloud PlatformMongoDB Days UK: Run MongoDB on Google Cloud Platform
MongoDB Days UK: Run MongoDB on Google Cloud Platform
MongoDB
 
Introduction to Google Compute Engine
Introduction to Google Compute EngineIntroduction to Google Compute Engine
Introduction to Google Compute Engine
Colin Su
 
Building hybrid cloud with cloudify (public)
Building hybrid cloud with cloudify (public)Building hybrid cloud with cloudify (public)
Building hybrid cloud with cloudify (public)
Nati Shalom
 
Best Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft AzureBest Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft Azure
Brian Benz
 
AWS as platform for scalable applications
AWS as platform for scalable applicationsAWS as platform for scalable applications
AWS as platform for scalable applications
Roman Gomolko
 
Google Cloud Platform as a Backend Solution for your Product
Google Cloud Platform as a Backend Solution for your ProductGoogle Cloud Platform as a Backend Solution for your Product
Google Cloud Platform as a Backend Solution for your Product
Sergey Smetanin
 
Google Cloud Platform Special Training
Google Cloud Platform Special TrainingGoogle Cloud Platform Special Training
Google Cloud Platform Special Training
Simon Su
 
AutoScaling and Drupal
AutoScaling and DrupalAutoScaling and Drupal
AutoScaling and Drupal
Promet Source
 
Scaling Drupal & Deployment in AWS
Scaling Drupal & Deployment in AWSScaling Drupal & Deployment in AWS
Scaling Drupal & Deployment in AWS
永对 陈
 
Amazon Web Services Building Blocks for Drupal Applications and Hosting
Amazon Web Services Building Blocks for Drupal Applications and HostingAmazon Web Services Building Blocks for Drupal Applications and Hosting
Amazon Web Services Building Blocks for Drupal Applications and Hosting
Acquia
 
A Tour of Google Cloud Platform
A Tour of Google Cloud PlatformA Tour of Google Cloud Platform
A Tour of Google Cloud Platform
Colin Su
 
Introduction to Google Cloud Platform
Introduction to Google Cloud PlatformIntroduction to Google Cloud Platform
Introduction to Google Cloud Platform
Opsta
 
Infrastructure as Code for Beginners
Infrastructure as Code for BeginnersInfrastructure as Code for Beginners
Infrastructure as Code for Beginners
David Völkel
 
Deep Learning on AWS (November 2016)
Deep Learning on AWS (November 2016)Deep Learning on AWS (November 2016)
Deep Learning on AWS (November 2016)
Julien SIMON
 
Autoscaling in kubernetes v1
Autoscaling in kubernetes v1Autoscaling in kubernetes v1
Autoscaling in kubernetes v1
JurajHantk
 
Cloud hosting survey
Cloud hosting surveyCloud hosting survey
Cloud hosting survey
Michael Peters
 
Quick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerQuick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase Server
Nic Raboy
 
How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014How to Puppetize Google Cloud Platform - PuppetConf 2014
How to Puppetize Google Cloud Platform - PuppetConf 2014
Puppet
 
MongoDB Days UK: Run MongoDB on Google Cloud Platform
MongoDB Days UK: Run MongoDB on Google Cloud PlatformMongoDB Days UK: Run MongoDB on Google Cloud Platform
MongoDB Days UK: Run MongoDB on Google Cloud Platform
MongoDB
 
Introduction to Google Compute Engine
Introduction to Google Compute EngineIntroduction to Google Compute Engine
Introduction to Google Compute Engine
Colin Su
 
Building hybrid cloud with cloudify (public)
Building hybrid cloud with cloudify (public)Building hybrid cloud with cloudify (public)
Building hybrid cloud with cloudify (public)
Nati Shalom
 
Best Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft AzureBest Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft Azure
Brian Benz
 
AWS as platform for scalable applications
AWS as platform for scalable applicationsAWS as platform for scalable applications
AWS as platform for scalable applications
Roman Gomolko
 
Google Cloud Platform as a Backend Solution for your Product
Google Cloud Platform as a Backend Solution for your ProductGoogle Cloud Platform as a Backend Solution for your Product
Google Cloud Platform as a Backend Solution for your Product
Sergey Smetanin
 
Google Cloud Platform Special Training
Google Cloud Platform Special TrainingGoogle Cloud Platform Special Training
Google Cloud Platform Special Training
Simon Su
 
AutoScaling and Drupal
AutoScaling and DrupalAutoScaling and Drupal
AutoScaling and Drupal
Promet Source
 
Scaling Drupal & Deployment in AWS
Scaling Drupal & Deployment in AWSScaling Drupal & Deployment in AWS
Scaling Drupal & Deployment in AWS
永对 陈
 
Amazon Web Services Building Blocks for Drupal Applications and Hosting
Amazon Web Services Building Blocks for Drupal Applications and HostingAmazon Web Services Building Blocks for Drupal Applications and Hosting
Amazon Web Services Building Blocks for Drupal Applications and Hosting
Acquia
 
A Tour of Google Cloud Platform
A Tour of Google Cloud PlatformA Tour of Google Cloud Platform
A Tour of Google Cloud Platform
Colin Su
 
Introduction to Google Cloud Platform
Introduction to Google Cloud PlatformIntroduction to Google Cloud Platform
Introduction to Google Cloud Platform
Opsta
 
Infrastructure as Code for Beginners
Infrastructure as Code for BeginnersInfrastructure as Code for Beginners
Infrastructure as Code for Beginners
David Völkel
 
Deep Learning on AWS (November 2016)
Deep Learning on AWS (November 2016)Deep Learning on AWS (November 2016)
Deep Learning on AWS (November 2016)
Julien SIMON
 
Autoscaling in kubernetes v1
Autoscaling in kubernetes v1Autoscaling in kubernetes v1
Autoscaling in kubernetes v1
JurajHantk
 
Quick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerQuick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase Server
Nic Raboy
 

Viewers also liked (15)

Google App Engine
Google App EngineGoogle App Engine
Google App Engine
Software Park Thailand
 
Google App Engine: An Introduction
Google App Engine: An IntroductionGoogle App Engine: An Introduction
Google App Engine: An Introduction
Abu Ashraf Masnun
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
rajdeep
 
Google app engine
Google app engineGoogle app engine
Google app engine
Renjith318
 
App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010
Chris Schalk
 
Google app engine introduction
Google app engine introductionGoogle app engine introduction
Google app engine introduction
rajsandhu1989
 
Google app engine - Overview
Google app engine - OverviewGoogle app engine - Overview
Google app engine - Overview
Nathan Quach
 
Google app engine
Google app engineGoogle app engine
Google app engine
Suraj Mehta
 
Google app engine
Google app engineGoogle app engine
Google app engine
Suraj Mehta
 
Cse ppt
Cse pptCse ppt
Cse ppt
Chirag Agarwal
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
Chakkrit (Kla) Tantithamthavorn
 
Download presentation
Download presentationDownload presentation
Download presentation
webhostingguy
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminar
shilpi nagpal
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
SlideShare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
SlideShare
 
Google App Engine: An Introduction
Google App Engine: An IntroductionGoogle App Engine: An Introduction
Google App Engine: An Introduction
Abu Ashraf Masnun
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
rajdeep
 
Google app engine
Google app engineGoogle app engine
Google app engine
Renjith318
 
App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010
Chris Schalk
 
Google app engine introduction
Google app engine introductionGoogle app engine introduction
Google app engine introduction
rajsandhu1989
 
Google app engine - Overview
Google app engine - OverviewGoogle app engine - Overview
Google app engine - Overview
Nathan Quach
 
Google app engine
Google app engineGoogle app engine
Google app engine
Suraj Mehta
 
Google app engine
Google app engineGoogle app engine
Google app engine
Suraj Mehta
 
Download presentation
Download presentationDownload presentation
Download presentation
webhostingguy
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminar
shilpi nagpal
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
SlideShare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
SlideShare
 
Ad

Similar to Google App Engine overview (GAE/J) (20)

Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App EngineJava Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
IMC Institute
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
Eamonn Boyle
 
Enabling .NET Apps with Monitoring and Management Using Steeltoe
Enabling .NET Apps with Monitoring and Management Using SteeltoeEnabling .NET Apps with Monitoring and Management Using Steeltoe
Enabling .NET Apps with Monitoring and Management Using Steeltoe
VMware Tanzu
 
Azure web apps
Azure web appsAzure web apps
Azure web apps
Vaibhav Gujral
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App Engine
Alexander Zamkovyi
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best Practices
Andrew Ferrier
 
Chinnasamy Manickam
Chinnasamy ManickamChinnasamy Manickam
Chinnasamy Manickam
Chinnasamy Manickam
 
SPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA Java Case Study
SPEC INDIA Java Case Study
SPEC INDIA
 
Modernize Java Apps on Microsoft Azure
Modernize Java Apps on Microsoft AzureModernize Java Apps on Microsoft Azure
Modernize Java Apps on Microsoft Azure
David J Rosenthal
 
Java Web Programming Using Cloud Platform: Module 10
Java Web Programming Using Cloud Platform: Module 10Java Web Programming Using Cloud Platform: Module 10
Java Web Programming Using Cloud Platform: Module 10
IMC Institute
 
Azure Cloud Application Development Workshop - UGIdotNET
Azure Cloud Application Development Workshop - UGIdotNETAzure Cloud Application Development Workshop - UGIdotNET
Azure Cloud Application Development Workshop - UGIdotNET
Lorenzo Barbieri
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
SachinSingh217687
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsTools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
VMware Tanzu
 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
Daniel Bryant
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
rajdeep
 
Made for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsMade for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile Apps
SPC Adriatics
 
Connecting Xamarin Apps with IBM Worklight in Bluemix
Connecting Xamarin Apps with IBM Worklight in BluemixConnecting Xamarin Apps with IBM Worklight in Bluemix
Connecting Xamarin Apps with IBM Worklight in Bluemix
IBM
 
Azure Serverless Toolbox
Azure Serverless ToolboxAzure Serverless Toolbox
Azure Serverless Toolbox
Johan Eriksson
 
Sug bangalore - headless jss
Sug bangalore - headless jssSug bangalore - headless jss
Sug bangalore - headless jss
Anindita Bhattacharya
 
Azure App Services
Azure App ServicesAzure App Services
Azure App Services
Alper Ebicoglu
 
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App EngineJava Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
IMC Institute
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
Eamonn Boyle
 
Enabling .NET Apps with Monitoring and Management Using Steeltoe
Enabling .NET Apps with Monitoring and Management Using SteeltoeEnabling .NET Apps with Monitoring and Management Using Steeltoe
Enabling .NET Apps with Monitoring and Management Using Steeltoe
VMware Tanzu
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App Engine
Alexander Zamkovyi
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best Practices
Andrew Ferrier
 
SPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA Java Case Study
SPEC INDIA Java Case Study
SPEC INDIA
 
Modernize Java Apps on Microsoft Azure
Modernize Java Apps on Microsoft AzureModernize Java Apps on Microsoft Azure
Modernize Java Apps on Microsoft Azure
David J Rosenthal
 
Java Web Programming Using Cloud Platform: Module 10
Java Web Programming Using Cloud Platform: Module 10Java Web Programming Using Cloud Platform: Module 10
Java Web Programming Using Cloud Platform: Module 10
IMC Institute
 
Azure Cloud Application Development Workshop - UGIdotNET
Azure Cloud Application Development Workshop - UGIdotNETAzure Cloud Application Development Workshop - UGIdotNET
Azure Cloud Application Development Workshop - UGIdotNET
Lorenzo Barbieri
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsTools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
VMware Tanzu
 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
Daniel Bryant
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
rajdeep
 
Made for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsMade for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile Apps
SPC Adriatics
 
Connecting Xamarin Apps with IBM Worklight in Bluemix
Connecting Xamarin Apps with IBM Worklight in BluemixConnecting Xamarin Apps with IBM Worklight in Bluemix
Connecting Xamarin Apps with IBM Worklight in Bluemix
IBM
 
Azure Serverless Toolbox
Azure Serverless ToolboxAzure Serverless Toolbox
Azure Serverless Toolbox
Johan Eriksson
 
Ad

Recently uploaded (20)

Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 

Google App Engine overview (GAE/J)

  • 1. GAE Overview Moch Nasrullah R Samsung R&D Institute Indonesia (SRIN) November 2013
  • 4. Cloud Computing Cloud Services Cloud Clients (Web browser, Desktop App, Mobile App, embeded, ...)
  • 6. Cloud classification Software as a Service (SaaS) Application: -Web Apps -Desktop Apps -Mobile Apps (Google Apps, Google Translate, Office 360, NetSuite, IBM Lotus Live, GitHub) Platform as a Service (PaaS) Development Platform + Runtime Tools + Environment (Google App Engine, Heroku, Windows Azure, force.com, Rollbase) Infrastructure as a Service (IaaS) CPU Networks Data Storage (AWS, VM Ware, Joyent, Rackspace)
  • 7. Google App Engine • run your web applications on Google's infrastructure – Google handles the maintenance infrasturcture: hardware failures, security patches, OS upgrades • Free ... within quota
  • 8. GAE Limits & Quota • • • • 10 Apps per user 5 Mio pageview free per month 6.5 hours of CPU and 1 Gb in & out traffic https://developers.google.com/appengine/do cs/quotas
  • 9. Why GAE • Easy to build – Language support (Java, Python, GO, PHP) – Automatic scaling & load balancing • Easy to maintain – Web based admin dashboard • Easy to scale (traffic & data storage) – GAE Datastore – Google Cloud SQL – Google Cloud Storage
  • 11. Let’s give it a try • Follow the getting started in link below: • https://developers.google.com/appengine/docs/java/gettingstarted/introduction
  • 12. Run Eclipse after Installing JDK
  • 17. The Servlet Class package guestbook; import java.io.IOException; import javax.servlet.http.*; public class GuestbookServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { resp.setContentType("text/plain"); resp.getWriter().println("Hello, world"); } }
  • 18. Project Structure Java source code other configuration JARs for libraries app configuration JSPs, images, data files
  • 20. Preparation for deployment • Register to Google App Engine • Create an Application • Deploy via Eclipse
  • 21. Register to App Engine • Register at: https://appengine.google.com/ • Create an Application
  • 22. Create an Application • For now, just fill in ‘Application Identifier’ and ‘Application Title’, than accept ‘Term of Service’
  • 23. Problem when Deploying • Adding VM config o Open eclipse.ini in the eclipse folder o Add below lines before -vmargs -vm C:Javajdk1.7.0_40binjavaw.exe
  • 24. Adding VM config • • • • Open eclipse.ini in the eclipse folder Add below lines before -vmargs -vm C:Javajdk1.7.0_40binjavaw.exe
  • 25. Sign in to Deploy
  • 26. Setting App ID & Version Input Application Identifier registered at appspot.com
  • 27. Refactor Example to MVC • Using JSP as View template – JSP files will resides inside ‘WEB-INF/jsp’ folder – So users can not access our template directly • Using Servlet as Controller – Put model in request attribute – Forward to proper View – Change SignGuestbookServlet.java so it redirect to servlet (not JSP): resp.sendRedirect("/guestbook?guestbookName=" + guestbookName);
  • 28. GuestbookServlet.java – doGet() UserService userService = UserServiceFactory.getUserService(); User user = userService.getCurrentUser(); String signUrl = ""; String userNickname = ""; if (user!=null) { signUrl = userService.createLogoutURL(req.getRequestURI()); userNickname = user.getNickname(); } else { signUrl = userService.createLoginURL(req.getRequestURI()); } Login or Logout URL String guestbookName = req.getParameter("guestbookName"); if (guestbookName == null) { guestbookName = "default"; } Retrieve data from DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); datastore Key guestbookKey = KeyFactory.createKey("Guestbook", guestbookName); Query query = new Query("Greeting", guestbookKey).addSort("date", Query.SortDirection.DESCENDING); List<Entity> greetings = datastore.prepare(query).asList(FetchOptions.Builder.withLimit(5)); // put data tobe displayed in JSP req.setAttribute("signUrl", signUrl); req.setAttribute("userNickname", userNickname); req.setAttribute("guestbookName", guestbookName); req.setAttribute("greetingList", greetings); Put data in Request Attribute String templateFile = "/WEB-INF/jsp/guestbook.jsp"; RequestDispatcher rd = getServletContext().getRequestDispatcher(templateFile); rd.forward(req, resp); Forward to View
  • 29. /WEB-INF/jsp/guestbook.jsp <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> Taglib <html> <head> <link type="text/css" rel="stylesheet" href="/stylesheets/main.css" /> </head> <body> <c:if test="${userNickname!=''}"> <p>Hello, ${fn:escapeXml(userNickname)}! (You can <a href="${signUrl}">sign out</a>.)</p> Say proper hello to </c:if> sign in user <c:if test="${userNickname==''}"> <p>Hello! <a href="${signUrl}">Sign in</a> to include your name with greetings you post.</p> </c:if> <c:if test="${empty greetingList}"> <p>Guestbook '${fn:escapeXml(guestbookName)}' has no messages.</p> </c:if> <c:if test="${not empty greetingList}"> <p>Messages in Guestbook '${fn:escapeXml(guestbookName)}'.</p> </c:if>
  • 30. /WEB-INF/jsp/guestbook.jsp Iterate Greeting List <c:forEach items="${greetingList}" var="greeting"> Passed from Servlet <c:if test="${not empty greeting.properties['user']}"> <p><b>${fn:escapeXml(greeting.properties['user'].nickname)}</b> wrote:</p> </c:if> <c:if test="${empty greeting.properties['user']}"> <p>An anonymous person wrote:</p> </c:if> <blockquote>${fn:escapeXml(greeting.properties['content'])}</blockquote> </c:forEach> Form same as previous <form action="/sign" method="post"> <div><textarea name="content" rows="3" cols="60"></textarea></div> <div><input type="submit" value="Post Greeting" /></div> <input type="hidden" name="guestbookName" value="${fn:escapeXml(guestbookName)}"/> </form> </body> </html>
  • 31. Maybe Next Time • Using Guice in GAE/J • Using GAE Python
  • 32. Reference • http://www.slideshare.net/dimityrdanailov/google-app-enginevarna-lab-19062013 • http://www.slideshare.net/LarsVogel/google-app-engine-for-java7698966 • http://www.google.com/events/io/2009/sessions.html#appengine • http://www.google.com/events/io/2010/sessions.html#App%20Eng ine • http://www.google.com/events/io/2011/sessions.html#appengine-track • https://developers.google.com/events/io/2012/sessions#cloudplatform • https://developers.google.com/events/io/2013/sessions#t-googlecloud-platform • https://developers.google.com/appengine/