google app engine for java (gae/j)

17
Google App Engine for Java Lars Vogel Ralf Gueldemeister Venkiteswaran Balakrishnan

Upload: lars-vogel

Post on 17-May-2015

3.766 views

Category:

Documents


5 download

DESCRIPTION

Overview of the Google App Engine with a focus on the Java side.

TRANSCRIPT

Page 1: Google App Engine for Java (GAE/J)

Google App Engine for Java

Lars Vogel Ralf Gueldemeister Venkiteswaran Balakrishnan

Page 2: Google App Engine for Java (GAE/J)

Google App Engine

Scalable Infrastructure

Commonly referred to as “Platform as a Service”, the GAE allows you to host webapplications in the Google infrastructure.

Page 3: Google App Engine for Java (GAE/J)

Scalable Infrastructure

You cannot see behind the curtain, GAE provides a fixed set of API to you.

Page 4: Google App Engine for Java (GAE/J)

Google App Engine

Scalable Infrastructure

Page 5: Google App Engine for Java (GAE/J)

Google App Engine - Limits

Scalable Infrastructure

10 Applications per User

5 Million Pageviews are free per month.

Approx. 6.5 hours of CPU and 1 Gigabyte of traffic.

http://code.google.com/intl/en-EN/appengine/docs/billing.html

Page 6: Google App Engine for Java (GAE/J)

Google App Engine –

Programming Languages

Python Python

Java-ischJava-isch

ScalaScala GroovyGroovy JRubyJRuby JPythonJPython

……

Page 7: Google App Engine for Java (GAE/J)

Webprogramming with JavaServlet vrs. JSP

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

Page 8: Google App Engine for Java (GAE/J)

Google App Engine – Java

Restricts usage of some Java classes, e.g. Threads

Allows to use standard Java EE API

Provides Low-Level Google API

Page 9: Google App Engine for Java (GAE/J)

Data Store

Based on BigTableSorted Map, no JoinsSchemalessTransactional

Low-level APIsJDO and JPABlobstore

Page 10: Google App Engine for Java (GAE/J)

Datastore via JDO Data Classes

@PersistenceCapablepublic class Employee { @Persistent private String name}

PersistenceManagerPersistenceManager pm = PMF.get().getPersistenceManager();pm.makePersistent(employee);pm.close;

Retrieval and Queriesemployee = 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;

Page 11: Google App Engine for Java (GAE/J)

App Engine Services

CachingURL FetchingMailInstant MessagingImage ManipulationUser ManagementBackground Tasks

Page 12: Google App Engine for Java (GAE/J)

Possible Web Frameworks on GAE/J

Basically all Java Web frameworks, e.g. JSP, Servlets based

GWT, JSF, Struts, Wicket

Page 13: Google App Engine for Java (GAE/J)

Demo

Page 14: Google App Engine for Java (GAE/J)

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/

Datastore:

http://code.google.com/appengine/docs/java/datastore/http://code.google.com/appengine/articles/datastore/overview.htmlhttp://www.readwriteweb.com/enterprise/2009/02/is-the-relational-database-doomed.phphttp://www.slideshare.net/LucaMarrocco/google-app-engine-java

Page 15: Google App Engine for Java (GAE/J)

Photo credits• Guy pulling the white wall http://www.sxc.hu/photo/702367• Balloon http://www.sxc.hu/photo/566242• 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

Page 16: Google App Engine for Java (GAE/J)

Thank you

For further questions:

[email protected]://www.vogella.dehttp://www.twitter.com/vogella

Page 17: Google App Engine for Java (GAE/J)

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