SlideShare una empresa de Scribd logo
1 de 74
Descargar para leer sin conexión
Google App Engine for Java
Lars Vogel
http://www.vogella.de
Twitter: http://www.twitter.com/vogella
About Lars
Works for SAP as product owner of a
SCRUM team.
Privately active in the Open Source
Community
Eclipse committer, received the Eclipse
Top Contributor community award 2010
Webmaster of http://www.vogella.de with
more then 15 000 visitors per day
Lars Vogel
http://www.vogella.de
Twitter: @vogella
Why do I quality?
• Two popular tutorials in the internet about
Google App Engine
– http://www.vogella.de/articles/GoogleAppEngineJava/article.html
– http://www.vogella.de/articles/GoogleAppEngine/article.html
• Published an article about robots on the App
Engine in the (german) Eclipse Magazin
• Was technical editor for a Google App Engine
Book (unpublished)
What is cloud computing for me?
What is the Google App Engine?
Development for GAE with Java
Persistence without SQL
Tools - A fool with a tool is still a fool
App Engine Services
Testing on the cloud
And of course coding
A typical system setup
OS +Application Server + DB
You need scaling...
Application Server
Database
Application Server Application Server
So you are fine, right?...
Designed for peek consumption
Time
Utilization
Cloud computing tries to solve this
What is a cloud computing not?
Putting one or more computer in the
internet is not necessary cloud
computing
That is just a server in
the internet
What is a cloud computing?
Cloud computing is Web-based
processing, whereby shared resources,
software, and information are provided to
computers and other devices (such as
smartphones) on demand over the
Internet.
Super blabla,
this means
nothing...
Cloud: ....some kind of abstracting from the
hardware and providing resources on demand
Time
What types of cloud computing do
we have?
Infrastructure as a Service -> Amazon
Platform as a Service -> Google App
Engine
Software as a service -> Salesforce.com,
MyERP
Google App Engine
Scalable Infrastructure
GAE allows you to host
webapplications on the
Google infrastructure.
Scalable Infrastructure
Amazon provides virtual servers
App Engine provides an
interface to program against
App Engine give no access to
the underlying system /
hardware
Difference to Amazons
Run your app on the Google
Infrastructure
Scalable Infrastructure
Google handles the infrastructure,
e.g. hardware failures, security
patches, OS upgrades
Sometimes there are issues
and the usage of App Engine is
free…. within limits
in any case you only pay for what your use
Google App Engine – Free Hosting
Scalable Infrastructure10 Applications per User
5 Million Pageviews are free per month.
Approx. 6.5 hours of CPU and 1 Gigabyte of inbound and outbound traffic.
100 hits per secs (non-billing) and 500 for billing enabled applications
http://code.google.com/intl/en-EN/appengine/docs/billing.html
How does Google run thousands of
thousands Java apps at the same
time?
They don’t… applications which are
not actively used will be frozen and
saved to big table
 Initial startup time
App Engine Architecture
App Engine
FrontEnd
App Engine
FrontEnd
App Engine
FrontEnd
AppServer AppServer AppServer
Load Balancer
So it scales
but what
about
Platform as a
service?
Writing Java Webs application is hard
from Guillaume Laforge and Patrick Chanezon http://www.slideshare.net/glaforge/google-app-engine-java-
groovy-baby
To write a Java Web application
• Install / prepare the server
• Install / Configure the database
• Setup the webcontainer
• Develop your application
• Package your application into a WAR file
• Deploy it on your server
...developing a Java Web
application from scratch is really,
really slow due to the initial setup
required
Google App Engine –
Programming Languages
Python
Java-isch
Scala Groovy JRuby JPython
…
Still some issues with Grails....
Servlets and JSPs
A servlet is a Java class which answers a
HTTP request within a web container.
JavaServer Pages (JSP) are files which
contains HTML and Java code. The web
container compiles the JSP into a servlet at
the first time of accessing this JSP
Possible Web Frameworks on
GAE
Basically all Java Web
frameworks, e.g. JSP,
Servlets based
GWT, JSF, Struts, Wicket
App Engine can be more then just
a web application platform
Scalable Infrastructure
Doesn‘t have to be a webapplication, can be a backend for Android or iPhones...
Can be used to do some serious number crunching
Develop according to Java
standards
from Guillaume Laforge and Patrick Chanezon http://www.slideshare.net/glaforge/google-app-
engine-java-groovy-baby
Session Support
Turned off by default
appengine-web.xml
<sessions-enabled>true</sessions-enabled>
Persistent and distributed
Configuration
web.xml
appengine-web.xml
- allows several versions of your app
- can define static content -> super fast
- can define system variables
- enable ssl and http sessions
Development Tools
DevApp Server
Scalable Infrastructure
Emulates the Google App Engine,
its service and restrictions
Based on Jetty
Eclipse
Scalable Infrastructure
Deployment
Scalable Infrastructure
Run your application on appplication-
id.appspot.com or on your own
domain
Command line or Eclipse based
Logging
java.util.logging.Logger
System.out and System.err are also logged
Performance
Be fast
You have to be fast:
• 30 seconds to respond!
• Otherwise
com.google.apphosting.api.DeadlineExceeded
Exception
Google helps you that as its optimize its
infrastructure all the time
Example for recent performance work
Byte code used to enhanced dynamically, now App Engine does this this statically.
JIT and GC improvements
Example Work on reflection
Data from Google I/O 2010
Limits
Limits
No native threads – but Tasks
No sockets
No write access to file system
No Native code
Not all standard Java classes available (white list)
Processes must finish without 30 secs (Tasks
Chains…)
Compartibility is increasing
Whitelist is growing.
More and more libraries are supported
AppStat - Servlet filter in web.xml
<filter>
<filter-name>appstats</filter-name>
<filter-
class>com.google.appengine.tools.appstats.Appstats
Filter</filter-class>
<init-param>
<param-name>logMessage</param-name>
<param-value>Appstats available:
/appstats/details?time={ID}</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>appstats</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Access AppStats
<servlet>
<servlet-name>appstats</servlet-name>
<servlet-
class>com.google.appengine.tools.appstats.Appstats
Servlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>appstats</servlet-name>
<url-pattern>/appstats/*</url-pattern>
</servlet-mapping>
<security-constraint>
....
AppStat
Source: http://googleappengine.blogspot.com/2010/03/easy-performance-
profiling-with.html
Datastore
Storing data
Application can store data in
memory, memcache or the
datastore
Datastore
The datastore is App Engine's non-relational
database
Uses internally Bigtable which is a key-value
store
Read / Write Consistent and distributed
Datastore
The performance of a query depends only on
the size of your result set. It does not depend
on the total number of data entries.
Data Store
Based on BigTable
Sorted Map, no Joins
Schemaless
Transactional
Low-level APIs
JDO and JPA
Blobstore
Datastore via JDO
Data Classes
@PersistenceCapable
public class Employee {
@Persistent
private String name
}
PersistenceManager
PersistenceManager pm = PMF.get().getPersistenceManager();
pm.makePersistent(employee);
pm.close;
Retrieval and Queries
employee = pm.getObjectById(Employee.class, key);
Query query = pm.newQuery(Employee.class, “name = :name”);
List<Employee> results = (List<Employee>) query.execute("Smith");
Relations
@Persistent(mappedBy = "employee“)
private List<ContactInfo> contactInfoSets;
Indexes
• App Engine builds indexes for several simple
queries by default.
• If you run a query that filters on multiple
entity properties or orders results by multiple
properties, you will need an index for that
query.
• datastore-indexes.xml in WEB-INF/
Indexes
• Every query you run in the SDK automatically
gets indexed.
• Stored in application's datastore-
indexes.xml (Java)
Other storage possibilities
Blobstore
Memcache
Memcache
Cache data to avoid re-doing expensive
operations
Fast
Developer can define a time-limit but App
Engine may remove the data earlier -> do not
rely on the availability
Blogstore
Store, Upload and serve large files (<=2GB per
blob)
Read only
Application can read blobs as if there are local
files.
Requires billing enabled
App Engine Services
Caching
Channel API (push to client, comet)
URL Fetching
Mail
Instant Messaging (XMPP)
Image Manipulation
User Management
Background Tasks
Map (no Reduce)
XMPP (Chat)
Testing...
Testing
Local Testing
- equal functionality as the cloud
- not equal in scale
- LocalServiceTestHelper(….services to be tested)
Cloud Testing
- serving HTTP requests
- scalable and fast
- all limits apply which apply for standard application
-
Local Testing
Similar to standard Java testing
- JUnit, TestNG, Selenium
Difference: Some classes require a certain
App Engine setup, e.g. the datastore
AppEngine Testing API
Datastore:
Initialize your local environment
private final
LocalServiceTestHelper helper =
new
LocalServiceTestHelper(new
LocalDatastoreServiceTestConfig
());
Use the local test Datastore
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
assertEquals(0, ds.prepare(new
Query("yam")).countEntities(withLimit(10)));
ds.put(new Entity("yam"));
ds.put(new Entity("yam"));
assertEquals(2, ds.prepare(new
Query("yam")).countEntities(withLimit(10)));
API.Proxy
Register your own class as proxy for
the GAE API calls and interfere them.
Future
GAE 1.4
App Engine Future I
Running JVM (3 instances)
WarmupRequest via appengine-web.xml
The Channel API is now available for all users.
Task Queue has been officially released,
Deadline for Task Queue and Cron requests has been raised
to 10 minutes.
Source: http://groups.google.com/group/google-appengine/browse_thread/thread/0f90ef8dda3b8400
URL Fetch allowed response size has been increased, up to
32 MB. Request size is still limited to 1 MB.
Added a low-level AysncDatastoreService for making calls to
the datastore
asynchronously.
The whitelist has been updated to include all classes from
javax.xml.soap.
Source: http://groups.google.com/group/google-appengine/browse_thread/thread/0f90ef8dda3b8400
App Engine Future II
MySQL planned
Photo credits
Please add http://www.sxc.hu/photo/ to the number if not specified
• Cloud 1309726
• Agenda 187747
• Guy pulling the white wall http://www.sxc.hu/photo/702367
• Balloon http://www.sxc.hu/photo/566242
• Critical guy http://www.sxc.hu/photo/1173019
• Question mark in the box 1084632 and 1084633
• Hammer 604247
• Server 175983
• Turtle 1198861
• Thinking Guy 130484
• Picked Fence 695054
• Performance 765733
• Tools 1197009
• Open Door http://www.sxc.hu/photo/1228296
• Paper Chart http://www.sxc.hu/photo/565681
• Binary http://www.sxc.hu/photo/1072645
• Footprint http://www.sxc.hu/photo/442696
• Old Computer http://www.sxc.hu/photo/1028528
• Carton http://www.sxc.hu/photo/502161
• Eye http://www.sxc.hu/photo/933394
• Guitar playing man http://www.sxc.hu/photo/ 894247
• Brown bag 250762
• Future 1139530
• Guy reading book 406547
• Money House 1097251
Thank you
For further questions:
Lars.Vogel@gmail.com
http://www.vogella.de
http://www.twitter.com/vogella
Hands-on Tutorial
The following tutorials give an intro to GAE/J using servlets and JSP‘s
http://www.vogella.de/articles/GoogleAppEngineJava/article.html
http://code.google.com/intl/de-DE/appengine/docs/java/gettingstarted/
http://www.vogella.de/articles/GoogleAppEngine/article.html
License & Acknowledgements
• This work is licensed under the Creative Commons
Attribution-Noncommercial-No Derivative Works 3.0
Germany License
– See http://creativecommons.org/licenses/by-nc-
nd/3.0/de/deed.en_US

Más contenido relacionado

La actualidad más candente

Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM ICF CIRCUIT
 
Technical Deep Dive Into Atlassian's New Apps Performance Testing Framework
Technical Deep Dive Into Atlassian's New Apps Performance Testing FrameworkTechnical Deep Dive Into Atlassian's New Apps Performance Testing Framework
Technical Deep Dive Into Atlassian's New Apps Performance Testing FrameworkAtlassian
 
Building a Cerberus App Without Losing Our Heads: The Passage to a Cross-Plat...
Building a Cerberus App Without Losing Our Heads: The Passage to a Cross-Plat...Building a Cerberus App Without Losing Our Heads: The Passage to a Cross-Plat...
Building a Cerberus App Without Losing Our Heads: The Passage to a Cross-Plat...Atlassian
 
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...Naga Rohit
 
An Exploration of Cross-product App Experiences
An Exploration of Cross-product App ExperiencesAn Exploration of Cross-product App Experiences
An Exploration of Cross-product App ExperiencesAtlassian
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with PythonBrian Lyttle
 
What's New in Jira Cloud for Developers
What's New in Jira Cloud for DevelopersWhat's New in Jira Cloud for Developers
What's New in Jira Cloud for DevelopersAtlassian
 
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fastHow Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fastAtlassian
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge TriggersAtlassian
 
Serverless Analytics and Monitoring For Your Cloud App
Serverless Analytics and Monitoring For Your Cloud AppServerless Analytics and Monitoring For Your Cloud App
Serverless Analytics and Monitoring For Your Cloud AppAtlassian
 
Extra aem development tools by Justin Edelson
Extra aem development tools by Justin EdelsonExtra aem development tools by Justin Edelson
Extra aem development tools by Justin EdelsonAEM HUB
 
Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introductionsnevesbarros
 
Andy Bosch - JavaServer Faces in the cloud
Andy Bosch -  JavaServer Faces in the cloudAndy Bosch -  JavaServer Faces in the cloud
Andy Bosch - JavaServer Faces in the cloudAndy Bosch
 
What Does Jira Next-Gen Mean for Cloud Apps?
What Does Jira Next-Gen Mean for Cloud Apps?What Does Jira Next-Gen Mean for Cloud Apps?
What Does Jira Next-Gen Mean for Cloud Apps?Atlassian
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemAtlassian
 
12 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.212 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.2Tricode (part of Dept)
 
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQDynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQNetcetera
 
Building Faster With Your Team's UI Kit
Building Faster With Your Team's UI KitBuilding Faster With Your Team's UI Kit
Building Faster With Your Team's UI KitAtlassian
 
AFNetworking
AFNetworking AFNetworking
AFNetworking joaopmaia
 
Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Chinmoy Mohanty
 

La actualidad más candente (20)

Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM
 
Technical Deep Dive Into Atlassian's New Apps Performance Testing Framework
Technical Deep Dive Into Atlassian's New Apps Performance Testing FrameworkTechnical Deep Dive Into Atlassian's New Apps Performance Testing Framework
Technical Deep Dive Into Atlassian's New Apps Performance Testing Framework
 
Building a Cerberus App Without Losing Our Heads: The Passage to a Cross-Plat...
Building a Cerberus App Without Losing Our Heads: The Passage to a Cross-Plat...Building a Cerberus App Without Losing Our Heads: The Passage to a Cross-Plat...
Building a Cerberus App Without Losing Our Heads: The Passage to a Cross-Plat...
 
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
 
An Exploration of Cross-product App Experiences
An Exploration of Cross-product App ExperiencesAn Exploration of Cross-product App Experiences
An Exploration of Cross-product App Experiences
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
What's New in Jira Cloud for Developers
What's New in Jira Cloud for DevelopersWhat's New in Jira Cloud for Developers
What's New in Jira Cloud for Developers
 
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fastHow Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge Triggers
 
Serverless Analytics and Monitoring For Your Cloud App
Serverless Analytics and Monitoring For Your Cloud AppServerless Analytics and Monitoring For Your Cloud App
Serverless Analytics and Monitoring For Your Cloud App
 
Extra aem development tools by Justin Edelson
Extra aem development tools by Justin EdelsonExtra aem development tools by Justin Edelson
Extra aem development tools by Justin Edelson
 
Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introduction
 
Andy Bosch - JavaServer Faces in the cloud
Andy Bosch -  JavaServer Faces in the cloudAndy Bosch -  JavaServer Faces in the cloud
Andy Bosch - JavaServer Faces in the cloud
 
What Does Jira Next-Gen Mean for Cloud Apps?
What Does Jira Next-Gen Mean for Cloud Apps?What Does Jira Next-Gen Mean for Cloud Apps?
What Does Jira Next-Gen Mean for Cloud Apps?
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI System
 
12 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.212 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.2
 
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQDynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
 
Building Faster With Your Team's UI Kit
Building Faster With Your Team's UI KitBuilding Faster With Your Team's UI Kit
Building Faster With Your Team's UI Kit
 
AFNetworking
AFNetworking AFNetworking
AFNetworking
 
Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)
 

Similar a Google App Engine for Java Guide by Lars Vogel

What is App Engine? O
What is App Engine? OWhat is App Engine? O
What is App Engine? Oikailan
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java3Pillar Global
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Matthew McCullough
 
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 EngineAlexander Zamkovyi
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
File Repository on GAE
File Repository on GAEFile Repository on GAE
File Repository on GAElynneblue
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineTahir Akram
 
Azure Functions.pptx
Azure Functions.pptxAzure Functions.pptx
Azure Functions.pptxYachikaKamra
 
Google App Engine - Java Style
Google App Engine - Java StyleGoogle App Engine - Java Style
Google App Engine - Java StylePeter Lind
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10Chris Schalk
 
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: An Introduction
Google App Engine: An IntroductionGoogle App Engine: An Introduction
Google App Engine: An IntroductionAbu Ashraf Masnun
 
Introduction To Eclipse RCP
Introduction To Eclipse RCPIntroduction To Eclipse RCP
Introduction To Eclipse RCPwhbath
 
Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101ikailan
 
Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011Opevel
 
Google App Engine (Introduction)
Google App Engine (Introduction)Google App Engine (Introduction)
Google App Engine (Introduction)Praveen Hanchinal
 

Similar a Google App Engine for Java Guide by Lars Vogel (20)

Google Cloud Platform
Google Cloud Platform Google Cloud Platform
Google Cloud Platform
 
What is App Engine? O
What is App Engine? OWhat is App Engine? O
What is App Engine? O
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
 
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
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
XPages Mobile, #dd13
XPages Mobile, #dd13XPages Mobile, #dd13
XPages Mobile, #dd13
 
File Repository on GAE
File Repository on GAEFile Repository on GAE
File Repository on GAE
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App Engine
 
Azure Functions.pptx
Azure Functions.pptxAzure Functions.pptx
Azure Functions.pptx
 
Google App Engine - Java Style
Google App Engine - Java StyleGoogle App Engine - Java Style
Google App Engine - Java Style
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10
 
Google App Engine for PHP
Google App Engine for PHP Google App Engine for PHP
Google App Engine for PHP
 
Google App Engine: An Introduction
Google App Engine: An IntroductionGoogle App Engine: An Introduction
Google App Engine: An Introduction
 
Introduction To Eclipse RCP
Introduction To Eclipse RCPIntroduction To Eclipse RCP
Introduction To Eclipse RCP
 
Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101
 
Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011
 
Save Azure Cost
Save Azure CostSave Azure Cost
Save Azure Cost
 
Google App Engine (Introduction)
Google App Engine (Introduction)Google App Engine (Introduction)
Google App Engine (Introduction)
 

Más de Lars Vogel

Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020Lars Vogel
 
Eclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source projectEclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source projectLars Vogel
 
Android design and Custom views
Android design and Custom views Android design and Custom views
Android design and Custom views Lars Vogel
 
How to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDEHow to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDELars Vogel
 
Building beautiful User Interface in Android
Building beautiful User Interface in AndroidBuilding beautiful User Interface in Android
Building beautiful User Interface in AndroidLars Vogel
 
What is so cool about Android 4.0
What is so cool about Android 4.0What is so cool about Android 4.0
What is so cool about Android 4.0Lars Vogel
 
What is so cool about Android 4.0?
What is so cool about Android 4.0?What is so cool about Android 4.0?
What is so cool about Android 4.0?Lars Vogel
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart JfokusLars Vogel
 
Eclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse DayEclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse DayLars Vogel
 
Android C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceAndroid C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceLars Vogel
 
Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)Lars Vogel
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Lars Vogel
 
Eclipse 2011 Hot Topics
Eclipse 2011 Hot TopicsEclipse 2011 Hot Topics
Eclipse 2011 Hot TopicsLars Vogel
 
Android Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineAndroid Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineLars Vogel
 
Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models Lars Vogel
 
Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010Lars Vogel
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Lars Vogel
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easyLars Vogel
 
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Lars Vogel
 
Eclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugEclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugLars Vogel
 

Más de Lars Vogel (20)

Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020
 
Eclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source projectEclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source project
 
Android design and Custom views
Android design and Custom views Android design and Custom views
Android design and Custom views
 
How to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDEHow to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDE
 
Building beautiful User Interface in Android
Building beautiful User Interface in AndroidBuilding beautiful User Interface in Android
Building beautiful User Interface in Android
 
What is so cool about Android 4.0
What is so cool about Android 4.0What is so cool about Android 4.0
What is so cool about Android 4.0
 
What is so cool about Android 4.0?
What is so cool about Android 4.0?What is so cool about Android 4.0?
What is so cool about Android 4.0?
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart Jfokus
 
Eclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse DayEclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse Day
 
Android C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceAndroid C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen Conference
 
Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11
 
Eclipse 2011 Hot Topics
Eclipse 2011 Hot TopicsEclipse 2011 Hot Topics
Eclipse 2011 Hot Topics
 
Android Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineAndroid Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App Engine
 
Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models
 
Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010Eclipse 40 Labs- Eclipse Summit Europe 2010
Eclipse 40 Labs- Eclipse Summit Europe 2010
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easy
 
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4
 
Eclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugEclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ Rheinjug
 

Último

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Google App Engine for Java Guide by Lars Vogel

  • 1. Google App Engine for Java Lars Vogel http://www.vogella.de Twitter: http://www.twitter.com/vogella
  • 2. About Lars Works for SAP as product owner of a SCRUM team. Privately active in the Open Source Community Eclipse committer, received the Eclipse Top Contributor community award 2010 Webmaster of http://www.vogella.de with more then 15 000 visitors per day Lars Vogel http://www.vogella.de Twitter: @vogella
  • 3. Why do I quality? • Two popular tutorials in the internet about Google App Engine – http://www.vogella.de/articles/GoogleAppEngineJava/article.html – http://www.vogella.de/articles/GoogleAppEngine/article.html • Published an article about robots on the App Engine in the (german) Eclipse Magazin • Was technical editor for a Google App Engine Book (unpublished)
  • 4. What is cloud computing for me? What is the Google App Engine? Development for GAE with Java Persistence without SQL Tools - A fool with a tool is still a fool App Engine Services Testing on the cloud And of course coding
  • 5. A typical system setup OS +Application Server + DB
  • 6. You need scaling... Application Server Database Application Server Application Server
  • 7. So you are fine, right?...
  • 8. Designed for peek consumption Time Utilization
  • 9. Cloud computing tries to solve this
  • 10. What is a cloud computing not? Putting one or more computer in the internet is not necessary cloud computing That is just a server in the internet
  • 11. What is a cloud computing? Cloud computing is Web-based processing, whereby shared resources, software, and information are provided to computers and other devices (such as smartphones) on demand over the Internet. Super blabla, this means nothing...
  • 12. Cloud: ....some kind of abstracting from the hardware and providing resources on demand Time
  • 13. What types of cloud computing do we have? Infrastructure as a Service -> Amazon Platform as a Service -> Google App Engine Software as a service -> Salesforce.com, MyERP
  • 14. Google App Engine Scalable Infrastructure GAE allows you to host webapplications on the Google infrastructure.
  • 15. Scalable Infrastructure Amazon provides virtual servers App Engine provides an interface to program against App Engine give no access to the underlying system / hardware Difference to Amazons
  • 16. Run your app on the Google Infrastructure Scalable Infrastructure
  • 17. Google handles the infrastructure, e.g. hardware failures, security patches, OS upgrades
  • 19. and the usage of App Engine is free…. within limits in any case you only pay for what your use
  • 20. Google App Engine – Free Hosting Scalable Infrastructure10 Applications per User 5 Million Pageviews are free per month. Approx. 6.5 hours of CPU and 1 Gigabyte of inbound and outbound traffic. 100 hits per secs (non-billing) and 500 for billing enabled applications http://code.google.com/intl/en-EN/appengine/docs/billing.html
  • 21. How does Google run thousands of thousands Java apps at the same time? They don’t… applications which are not actively used will be frozen and saved to big table  Initial startup time
  • 22. App Engine Architecture App Engine FrontEnd App Engine FrontEnd App Engine FrontEnd AppServer AppServer AppServer Load Balancer
  • 23. So it scales but what about Platform as a service?
  • 24. Writing Java Webs application is hard from Guillaume Laforge and Patrick Chanezon http://www.slideshare.net/glaforge/google-app-engine-java- groovy-baby
  • 25. To write a Java Web application • Install / prepare the server • Install / Configure the database • Setup the webcontainer • Develop your application • Package your application into a WAR file • Deploy it on your server
  • 26. ...developing a Java Web application from scratch is really, really slow due to the initial setup required
  • 27. Google App Engine – Programming Languages Python Java-isch Scala Groovy JRuby JPython … Still some issues with Grails....
  • 28. Servlets and JSPs A servlet is a Java class which answers a HTTP request within a web container. JavaServer Pages (JSP) are files which contains HTML and Java code. The web container compiles the JSP into a servlet at the first time of accessing this JSP
  • 29. Possible Web Frameworks on GAE Basically all Java Web frameworks, e.g. JSP, Servlets based GWT, JSF, Struts, Wicket
  • 30. App Engine can be more then just a web application platform Scalable Infrastructure Doesn‘t have to be a webapplication, can be a backend for Android or iPhones... Can be used to do some serious number crunching
  • 31. Develop according to Java standards from Guillaume Laforge and Patrick Chanezon http://www.slideshare.net/glaforge/google-app- engine-java-groovy-baby
  • 32. Session Support Turned off by default appengine-web.xml <sessions-enabled>true</sessions-enabled> Persistent and distributed
  • 33. Configuration web.xml appengine-web.xml - allows several versions of your app - can define static content -> super fast - can define system variables - enable ssl and http sessions
  • 35. DevApp Server Scalable Infrastructure Emulates the Google App Engine, its service and restrictions Based on Jetty
  • 37. Deployment Scalable Infrastructure Run your application on appplication- id.appspot.com or on your own domain Command line or Eclipse based
  • 40. Be fast You have to be fast: • 30 seconds to respond! • Otherwise com.google.apphosting.api.DeadlineExceeded Exception Google helps you that as its optimize its infrastructure all the time
  • 41. Example for recent performance work Byte code used to enhanced dynamically, now App Engine does this this statically. JIT and GC improvements Example Work on reflection Data from Google I/O 2010
  • 43. Limits No native threads – but Tasks No sockets No write access to file system No Native code Not all standard Java classes available (white list) Processes must finish without 30 secs (Tasks Chains…)
  • 44. Compartibility is increasing Whitelist is growing. More and more libraries are supported
  • 45. AppStat - Servlet filter in web.xml <filter> <filter-name>appstats</filter-name> <filter- class>com.google.appengine.tools.appstats.Appstats Filter</filter-class> <init-param> <param-name>logMessage</param-name> <param-value>Appstats available: /appstats/details?time={ID}</param-value> </init-param> </filter> <filter-mapping> <filter-name>appstats</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
  • 49. Storing data Application can store data in memory, memcache or the datastore
  • 50. Datastore The datastore is App Engine's non-relational database Uses internally Bigtable which is a key-value store Read / Write Consistent and distributed
  • 51. Datastore The performance of a query depends only on the size of your result set. It does not depend on the total number of data entries.
  • 52. Data Store Based on BigTable Sorted Map, no Joins Schemaless Transactional Low-level APIs JDO and JPA Blobstore
  • 53. Datastore via JDO Data Classes @PersistenceCapable public class Employee { @Persistent private String name } PersistenceManager PersistenceManager pm = PMF.get().getPersistenceManager(); pm.makePersistent(employee); pm.close; Retrieval and Queries employee = pm.getObjectById(Employee.class, key); Query query = pm.newQuery(Employee.class, “name = :name”); List<Employee> results = (List<Employee>) query.execute("Smith"); Relations @Persistent(mappedBy = "employee“) private List<ContactInfo> contactInfoSets;
  • 54. Indexes • App Engine builds indexes for several simple queries by default. • If you run a query that filters on multiple entity properties or orders results by multiple properties, you will need an index for that query. • datastore-indexes.xml in WEB-INF/
  • 55. Indexes • Every query you run in the SDK automatically gets indexed. • Stored in application's datastore- indexes.xml (Java)
  • 57. Memcache Cache data to avoid re-doing expensive operations Fast Developer can define a time-limit but App Engine may remove the data earlier -> do not rely on the availability
  • 58. Blogstore Store, Upload and serve large files (<=2GB per blob) Read only Application can read blobs as if there are local files. Requires billing enabled
  • 60. Caching Channel API (push to client, comet) URL Fetching Mail Instant Messaging (XMPP) Image Manipulation User Management Background Tasks Map (no Reduce) XMPP (Chat)
  • 62. Testing Local Testing - equal functionality as the cloud - not equal in scale - LocalServiceTestHelper(….services to be tested) Cloud Testing - serving HTTP requests - scalable and fast - all limits apply which apply for standard application -
  • 63. Local Testing Similar to standard Java testing - JUnit, TestNG, Selenium Difference: Some classes require a certain App Engine setup, e.g. the datastore AppEngine Testing API
  • 64. Datastore: Initialize your local environment private final LocalServiceTestHelper helper = new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig ());
  • 65. Use the local test Datastore DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); assertEquals(0, ds.prepare(new Query("yam")).countEntities(withLimit(10))); ds.put(new Entity("yam")); ds.put(new Entity("yam")); assertEquals(2, ds.prepare(new Query("yam")).countEntities(withLimit(10)));
  • 66. API.Proxy Register your own class as proxy for the GAE API calls and interfere them.
  • 68. App Engine Future I Running JVM (3 instances) WarmupRequest via appengine-web.xml The Channel API is now available for all users. Task Queue has been officially released, Deadline for Task Queue and Cron requests has been raised to 10 minutes. Source: http://groups.google.com/group/google-appengine/browse_thread/thread/0f90ef8dda3b8400
  • 69. URL Fetch allowed response size has been increased, up to 32 MB. Request size is still limited to 1 MB. Added a low-level AysncDatastoreService for making calls to the datastore asynchronously. The whitelist has been updated to include all classes from javax.xml.soap. Source: http://groups.google.com/group/google-appengine/browse_thread/thread/0f90ef8dda3b8400 App Engine Future II
  • 71. Photo credits Please add http://www.sxc.hu/photo/ to the number if not specified • Cloud 1309726 • Agenda 187747 • Guy pulling the white wall http://www.sxc.hu/photo/702367 • Balloon http://www.sxc.hu/photo/566242 • Critical guy http://www.sxc.hu/photo/1173019 • Question mark in the box 1084632 and 1084633 • Hammer 604247 • Server 175983 • Turtle 1198861 • Thinking Guy 130484 • Picked Fence 695054 • Performance 765733 • Tools 1197009 • Open Door http://www.sxc.hu/photo/1228296 • Paper Chart http://www.sxc.hu/photo/565681 • Binary http://www.sxc.hu/photo/1072645 • Footprint http://www.sxc.hu/photo/442696 • Old Computer http://www.sxc.hu/photo/1028528 • Carton http://www.sxc.hu/photo/502161 • Eye http://www.sxc.hu/photo/933394 • Guitar playing man http://www.sxc.hu/photo/ 894247 • Brown bag 250762 • Future 1139530 • Guy reading book 406547 • Money House 1097251
  • 72. Thank you For further questions: Lars.Vogel@gmail.com http://www.vogella.de http://www.twitter.com/vogella
  • 73. Hands-on Tutorial The following tutorials give an intro to GAE/J using servlets and JSP‘s http://www.vogella.de/articles/GoogleAppEngineJava/article.html http://code.google.com/intl/de-DE/appengine/docs/java/gettingstarted/ http://www.vogella.de/articles/GoogleAppEngine/article.html
  • 74. License & Acknowledgements • This work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License – See http://creativecommons.org/licenses/by-nc- nd/3.0/de/deed.en_US