Google App Engine: Java Technology In The Cloud

Similar documents
Cloud Computing Platform as a Service

PaaS Cloud mit Java. Eberhard Wolff, Principal Technologist, SpringSource A division of VMware VMware Inc. All rights reserved

Google Plugin for Eclipse

Developing with Google App Engine

Getting the most out of Spring and App Engine!!

Developing Solutions for Google Cloud Platform (CPD200) Course Agenda

Seminar report Google App Engine Submitted in partial fulfillment of the requirement for the award of degree Of CSE

Migrating traditional Java EE applications to mobile

Scaling Rails on App Engine with JRuby and Duby

Google GCP-Solution Architects Exam

Realtime visitor analysis with Couchbase and Elasticsearch

JBPM Course Content. Module-1 JBPM overview, Drools overview

Google App Engine HOWTO

Groovy and Grails in Google App Engine

DISTRIBUTED SYSTEMS [COMP9243] Lecture 8a: Cloud Computing WHAT IS CLOUD COMPUTING? 2. Slide 3. Slide 1. Why is it called Cloud?

Development of web applications using Google Technology

Call: JSP Spring Hibernate Webservice Course Content:35-40hours Course Outline

Scaling DreamFactory

How to scale Windows Azure Application

Zero Turnaround in Java Jevgeni Kabanov

Cloud Computing. Chapter 3 Platform as a Service (PaaS)

Spring and OSGi. Martin Lippert akquinet agile GmbH Bernd Kolb Gerd Wütherich

Openbravo Technology Platform

Extreme Java Productivity with Spring Roo and Spring 3.0

Developing Enterprise Cloud Solutions with Azure

GAE Google App Engine

13. Databases on the Web

OpenIAM Identity and Access Manager Technical Architecture Overview

Western Michigan University

com Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/-

Scaling App Engine Applications. Justin Haugh, Guido van Rossum May 10, 2011

Testing Your Application on / for Google App Engine

Serverless Architecture Hochskalierbare Anwendungen ohne Server. Sascha Möllering, Solutions Architect

Building Scalable Web Apps with Python and Google Cloud Platform. Dan Sanderson, April 2015

Cloud Spanner. Rohit Gupta, Solutions

Diplomado Certificación

Contents. Chapter 1: Google App Engine...1 What Is Google App Engine?...1 Google App Engine and Cloud Computing...2

Open Source Library Developer & IT Pro

Google Cloud Platform for Systems Operations Professionals (CPO200) Course Agenda

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

X100 ARCHITECTURE REFERENCES:

CLOUD COMPUTING It's about the data. Dr. Jim Baty Distinguished Engineer Chief Architect, VP / CTO Global Sales & Services, Sun Microsystems

Wednesday, January 25, 12

Platform as a Service (PaaS)

OSGi on the Server. Martin Lippert (it-agile GmbH)

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

Developing Microsoft Azure Solutions (70-532) Syllabus

<Insert Picture Here> MySQL Cluster What are we working on

How To Get Database Schema In Java Using >>>CLICK HERE<<<

Zero Turnaround in Java Watching the logs roll by Jevgeni Kabanov

RA-GRS, 130 replication support, ZRS, 130

Chicago Java User Group August 4, Polyglot Web Development With Grails 3

From EC2 to Alex Tolley

Developing Microsoft Azure Solutions (70-532) Syllabus

Motivation There are applications for which it is critical to establish certain availability, consistency, performance etc.

Cloud Programming. Programming Environment Oct 29, 2015 Osamu Tatebe

Basics of Cloud Computing Lecture 2. Cloud Providers. Satish Srirama

Developing Microsoft Azure Solutions (70-532) Syllabus

Adobe ColdFusion (2016 release)

Course Outline. Introduction to Azure for Developers Course 10978A: 5 days Instructor Led

Tapestry. Code less, deliver more. Rayland Jeans

What is Cloud Computing? What are the Private and Public Clouds? What are IaaS, PaaS, and SaaS? What is the Amazon Web Services (AWS)?

IntelliJ IDEA, the most intelligent Java IDE

Tableau Server - 101

Cloud + Big Data Putting it all Together

Enterprise Java Unit 1-Chapter 2 Prof. Sujata Rizal Java EE 6 Architecture, Server and Containers


App Engine: Datastore Introduction

Scalability of web applications

Adobe ColdFusion 11 Enterprise Edition

IBM Rational Software

NonStop as part of a modern state of the art IT Infrastructure

Cloud Computing. Chapter 3 Platform as a Service (PaaS)

Etanova Enterprise Solutions


Cloud Providers more AWS, Aneka

Setting Schema Name For Native Queries In. Hibernate >>>CLICK HERE<<<

MySQL & NoSQL: The Best of Both Worlds

CORE JAVA. Saying Hello to Java: A primer on Java Programming language

The Next Generation. Prabhat Jha Principal Engineer

Here comes the. Cloud. But is your architecture ready for

Contents at a Glance. vii

J2EE: Best Practices for Application Development and Achieving High-Volume Throughput. Michael S Pallos, MBA Session: 3567, 4:30 pm August 11, 2003

JELASTIC PLATFORM-AS-INFRASTRUCTURE

Roadmap to Cloud with Cloud Application Foundation

Porting Google App Engine Applications to IBM Middleware

CORE JAVA 1. INTRODUCATION

Cloud Computing. Technologies and Types

Container 2.0. Container: check! But what about persistent data, big data or fast data?!

Techno Expert Solutions

purequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc.

Homework 9: Stock Search Android App with Facebook Post A Mobile Phone Exercise

Building a Scalable Architecture for Web Apps - Part I (Lessons Directi)

Java Enterprise Edition

Erik Dörnenburg JAOO 2003

Croquet. William R. Speirs, Ph.D. Founder & CEO of Metrink

status Emmanuel Cecchet

Seam 3. Pete Muir JBoss, a Division of Red Hat

GemStone Systems. GemStone. GemStone/J 4.0

2011 IBM Research Strategic Initiative: Workload Optimized Systems

Transcription:

Google App Engine: Java Technology In The Cloud Toby Reyelts, Max Ross, Don Schwarz Google 1

Goals > Google App Engine > Java on App Engine > The App Engine Datastore > Demo > Questions 2 2

What Is Google App Engine? > A cloud-computing platform > Run your web apps on Google s infrastructure > We provide the container and services (PaaS) Hardware, connectivity Operating system JVM Servlet container Software services 3 3

Key Features > No need to install or maintain your own stack > We scale for you > Use Google s scalable services via standard APIs > Charge only for actual usage Always free to get started > Built-in application management console 4 4

App Engine Architecture Incoming Requests 5 5

App Engine Architecture Incoming Requests App Engine Front End App Engine Front End App Engine Front End 5 5

App Engine Architecture Incoming Requests App Engine Front End App Engine Front End App Engine Front End AppServer AppServer AppServer 5 5

App Engine Architecture Incoming Requests Load Balancer App Engine Front End App Engine Front End App Engine Front End AppServer AppServer AppServer 5 5

App Engine Architecture Incoming Requests Load Balancer App Engine Front End App Engine Front End App Engine Front End AppServer AppServer AppServer AppServer Other Google Infrastructure API Layer - Bigtable - Google Accounts App App App - Memcache - Image manipulation 5 5

When To Use Google App Engine > Targeting web applications Serve HTTP requests, limited to 30 seconds No long-running background processes No server push > Sandboxed environment No threads Read-only file system 6 6

WebHooks (coming soon) > Incoming email > XMPP > Google Wave > Task Queues 7 7

Java Support > Servlets > Software services > Sandboxing > DevAppServer > Deployment > Tooling 8 8

Servlet API > Full Servlet 2.5 Container HTTP Session JSP > Uses Jetty and Jasper Powered by Google s HTTP stack No Jetty-specific features Subject to change 9 9

Software Services Service Java Standard Google Infrastructure Authentication Servlet API Google Accounts Datastore JPA, JDO Bigtable Caching javax.cache memcacheg E-mail javax.mail Gmail gateway URLFetch URLConnection Caching HTTP proxy 10 10

Sandboxing > What do we do? Restrict JVM permissions WhiteList classes > Why is it necessary? Clustering - JVMs come and go Protect applications from one another 11 11

Sandboxing Restrictions Restriction Alternative Threads Async and Queue API (Soon!) Direct network connections URLConnection Direct file system writes Memory, memcache, datastore Java2D Images API Software rendering Native code Pure Java libraries 12 12

Flexible Sandboxing 13 13

Flexible Sandboxing JVM Permissions often too coarse. 13 13

Flexible Sandboxing JVM Permissions often too coarse. They either provide a cramped sandbox. 13 13

Flexible Sandboxing JVM Permissions often too coarse. They either provide a cramped sandbox. Or they hand over the nuclear launch codes. 13 13

Flexible Sandboxing JVM Permissions often too coarse. They either provide a cramped sandbox. Or they hand over the nuclear launch codes. App Engine delivers a happy medium. 13 13

Flexible Sandboxing - Reflection 14 14

Flexible Sandboxing - Reflection > Access private fields, call private methods suppressaccesschecks accessdeclaredmembers 14 14

Flexible Sandboxing - Reflection > Access private fields, call private methods suppressaccesschecks accessdeclaredmembers Bad! Field f = String.class.getDeclaredField( count ); f.setaccessible(true); f.set( Hello World, 2); 14 14

Flexible Sandboxing - Reflection > Access private fields, call private methods suppressaccesschecks accessdeclaredmembers Bad! Field f = String.class.getDeclaredField( count ); f.setaccessible(true); f.set( Hello World, 2); Good! Field f = MyClass.class.getDeclaredField( foo ); f.setaccessible(true); f.set(myobj, afoo); 14 14

Flexible Sandboxing - Class Loading 15 15

Flexible Sandboxing - Class Loading > Create user-controlled ClassLoaders createclassloader 15 15

Flexible Sandboxing - Class Loading > Create user-controlled ClassLoaders createclassloader Bad! ClassLoader myclassloader = new URLClassLoader() { public PermissionsCollection getpermissions(codesource cs) { // return AllPermission; } }; 15 15

Flexible Sandboxing - Class Loading > Create user-controlled ClassLoaders createclassloader Bad! ClassLoader myclassloader = new URLClassLoader() { }; public PermissionsCollection getpermissions(codesource cs) { } // return AllPermission; Good! ClassLoader myclassloader = new URLClassLoader() { }; public Class findclass(string classname) { } // define and load some newly generated bytecode 15 15

Flexible Sandboxing - Compatibility > Dependency Injection Frameworks Guice, Spring > Aspect Oriented Programming AspectJ, Spring AOP > Web Frameworks GWT, Tapestry, BlazeDS (Flex), Grails! > Alternate JVM languages Scala, Rhino, JRuby, Jython, Clojure, Groovy, PHP 16 16

DevAppServer > Emulates the production environment > Customized Jetty server > Local implementation of services LRU memcache Disk-backed datastore HttpClient-backed URLFetch > Some sandbox restrictions difficult to emulate 17 17

Deployment > Your app lives at <app_id>.appspot.com, or Custom domain with Google Apps for your Domain > Command line and IDE tools > Admin Console Dashboards Manage multiple versions View logs (java.util.logging) 18 18

Quotas and Billing Resource Provided Free Additional Cost CPU 6.5 hours/day $0.10/hour Bandwidth In 1GByte/day $0.10/GByte Bandwidth Out 1GByte/day $0.12/GByte Stored Data 1 GB $0.005/GB-day Emails sent 2000/day to users 5000/day to admins $0.0001/email 19 19

Tooling > SDK Tools API Command-line tools, Ant, and IDE plugins > Provides Deployment DevAppServer WhiteList XML validation > Google Eclipse Plugin, Intellij Plugin 20 20

The Datastore Is... > Transactional > Natively Partitioned > Hierarchical > Schema-less > Based on Bigtable > Not a relational db Wow. That is one big table. > Not a SQL engine 21 21

Simplifying Storage > Simplify development of apps > Simplify management of apps > App Engine services build on Google s strengths > Scale always matters Request volume Data volume 22 22

Datastore Storage Model > Basic unit of storage is an Entity consisting of Kind (table) Key (pk) Entity Group (top level ancestor) Has locking implications 0..N typed Properties (columns) 23 23

Interesting Datastore Modeling Features > Ancestor > Multi-value properties > Variable properties > Heterogenous property types Kind Person Entity Group /Person:Ethel Key /Person:Ethel Age Int64: 30 Hobbies String: Tennis Kind Person Entity Group /Person:Ethel Key /Person:Ethel/Person:Jane Age Double: 3.5 Pets Key:/Turtle:Sam Key:/Dog:Ernie 24 24

Datastore Transactions > Transactions apply to a single Entity Group Global transactions are feasible > get(), put(), delete() are transactional > Queries are not transactional (yet) /Person:Ethel Transaction /Person:Ethel/Person:Jane /Person:Max 25 25

Standards-based Persistence > JDO or JPA (your choice) Established apis and existing tooling Easier porting Mappable (mostly) to the datastore Soft schemas > DataNucleus App Engine plugin > Why not a JDBC driver instead? 26 26

Transparent Entity Group Management > Entity Group layout is important Write throughput Atomicity of updates > Ownership implies co-location within Entity Group @Entity class Person { //... @OneToMany List<Pet> pets; } Kind Pet Entity Group /Person:Ethel Key /Person:Ethel/Pet:Sam 27 27

Demo! 28 28

Demo - Login 29 29

Demo - Question 30 30

Demo - Question Result 31 31

Demo - Scoreboard 32 32

Demo - Code! 33 33

http://java-demo.appspot.com 34 34

Toby Reyelts, Max Ross, Don Schwarz tobyr@google.com maxr@google.com schwardo@google.com http://code.google.com/appengine Google Group: google-appengine-java 35