Introduction to Google AppEngine Development in Java Philippe Beaudoin (Track Sponsor)

Slides:



Advertisements
Similar presentations
Lecture13 Intro. to Google App Engine Keke Chen Based on Guido van Rossums presentation.
Advertisements

Cloud Service Models and Performance Ang Li 09/13/2010.
Ellucian Mobile: Don’t text and drive, kids!
Google App Engine Cloud B. Ramamurthy 7/11/2014CSE651, B. Ramamurthy1.
 Java  Python  Bigtable(Bt) is a distributed storage system for managing structured data that is designed to scale to a very large size.  Query Language.
Azure Services Platform Piotr Zierhoffer. Agenda Cloud? What is Azure? Environment Basic glossary Architecture Element description Deployment.
Google Bigtable A Distributed Storage System for Structured Data Hadi Salimi, Distributed Systems Laboratory, School of Computer Engineering, Iran University.
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
Nikolay Tomitov Technical Trainer SoftAcad.bg.  What are Amazon Web services (AWS) ?  What’s cool when developing with AWS ?  Architecture of AWS 
INTRODUCTION TO CLOUD COMPUTING Cs 595 Lecture 5 2/11/2015.
Google App Engine and Java Application: Clustering Internet search results for a person Aleksandar Kartelj Faculty of Mathematics,
Platform as a Service (PaaS)
Google AppEngine. Google App Engine enables you to build and host web apps on the same systems that power Google applications. App Engine offers fast.
Google App Engine Google APIs OAuth Facebook Graph API
By: Devesh Sharma.  Why Cloud Computing? ◦ Traditional Business Applications  Expensive  Complicated  Difficult to manage  Idea behind Cloud Computing.
Amazon EC2 Quick Start adapted from EC2_GetStarted.html.
Google App Engine Danail Alexiev Technical Trainer SoftAcad.bg.
SilverLining. Stuff we're covering Hardware infrastructure and scaling Cloud platform as a service The SilverLining Project.
Cloud Computing for the Enterprise November 18th, This work is licensed under a Creative Commons.
Prof. A.R. Rele. What Is Google App Engine? Google App Engine lets users run web applications on Google's infrastructure. App Engine applications are.
Lecture 8 – Platform as a Service. Introduction We have discussed the SPI model of Cloud Computing – IaaS – PaaS – SaaS.
Google App Engine Chien-Chung Shen
Cloud Operating System Unit 11 Sever Technology II M. C. Chiang Department of Computer Science and Engineering National Sun Yat-sen University Kaohsiung,
Austin code camp 2010 asp.net apps with azure table storage PRESENTED BY CHANDER SHEKHAR DHALL
1 NETE4631 Using Google Web Services and Using Microsoft Cloud Services Lecture Notes #7.
Google App Engine(GAE) Ma, Zhichao Cloud.
Meet with the AppEngine Márk Gergely eu.edge. What is AppEngine? It’s a tool, that lets you run your web applications on Google's infrastructure. –Google's.
Distributed Indexing of Web Scale Datasets for the Cloud {ikons, eangelou, Computing Systems Laboratory School of Electrical.
Overview of Cloud Computing Sven Rosvall ACCU
MCS 270 Spring 2014 Object-Oriented Software Development.
NoSQL Databases Oracle - Berkeley DB Rasanjalee DM Smriti J CSC 8711 Instructor: Dr. Raj Sunderraman.
NoSQL Databases Oracle - Berkeley DB. Content A brief intro to NoSQL About Berkeley Db About our application.
Large-scale Incremental Processing Using Distributed Transactions and Notifications Daniel Peng and Frank Dabek Google, Inc. OSDI Feb 2012 Presentation.
Introduction to Google App Engine. 2 Google App Engine Does one thing well: running web apps Simple app configuration Scalable Secure.
Cloudant & Redis Nikolay Tomitov Technical Trainer SoftAcad Training Center.
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
My project  Small-Medium Enterprises (SMEs)  faces goods distribution problems  needs necessary resources, money and technical expertise, to purchase.
1 Google App Engine APIs :Overview Feb – March, 2010 Patrick Chanezon Developer Advocate Google Developer Relations
NoSQL Or Peles. What is NoSQL A collection of various technologies meant to work around RDBMS limitations (mostly performance) Not much of a definition...
Google Map Engine Can export images to Map Engine from Earth Engine
1 Google App Engine APIs :Overview Feb – March, 2010 Patrick Chanezon Developer Advocate Google Developer Relations
Web Technologies Lecture 13 Introduction to cloud computing.
Bigtable: A Distributed Storage System for Structured Data
Technology Drill Down: Windows Azure Platform Eric Nelson | ISV Application Architect | Microsoft UK |
1 NETE4631 Using Google Web Services Lecture Notes #6.
Apache Solr Dima Ionut Daniel. Contents What is Apache Solr? Architecture Features Core Solr Concepts Configuration Conclusions Bibliography.
Cloud Computing from a Developer’s Perspective Shlomo Swidler CTO & Founder mydrifts.com 25 January 2009.
Building web applications with the Windows Azure Platform Ido Flatow | Senior Architect | Sela | This session.
1 Cloud Computing, CS Google App Engine. Introduction Google App Engine Components :  Programming Languages and Runtime / Sandbox  Datastore.
Orion Contextbroker PROF. DR. SERGIO TAKEO KOFUJI PROF. MS. FÁBIO H. CABRINI PSI – 5120 – TÓPICOS EM COMPUTAÇÃO EM NUVEM
Amazon Web Services. Amazon Web Services (AWS) - robust, scalable and affordable infrastructure for cloud computing. This session is about:
Ping Yeh, Software Engineer Chris Schalk, Developer Advocate Google App Engine.
Google App Engine. Contents Overview Getting Started Databases Inter-app Communications Modes.
Platform as a Service (PaaS)
NoSQL Databases Cloudant & Redis Nikolay Tomitov
Platform as a Service (PaaS)
Platform as a Service (PaaS)
Node.js Express Web Applications
INTRODUCTION TO PIG, HIVE, HBASE and ZOOKEEPER
Google App Engine Mandeep Singh (37926)
Amazon Storage- S3 and Glacier
Open Source distributed document DB for an enterprise
Platform as a Service.
The Improvement of PaaS Platform ZENG Shu-Qing, Xu Jie-Bin 2010 First International Conference on Networking and Distributed Computing SQUARE.
Twitter & NoSQL Integration with MVC4 Web API
Google App Engine B. Ramamurthy Based on the material available at
Google App Engine Danail Alexiev
Google App Engine Ying Zou 01/24/2016.
Introduction to Google App Engine
Presentation transcript:

Introduction to Google AppEngine Development in Java Philippe Beaudoin (Track Sponsor)

Overview What is Google AppEngine Hit the ground running: Your first GAE app The datastore Task Queues Overview of other services    ? 

What is Google AppEngine Fly me to the cloud, baby! PaaS (Platform as a Service) ?   ? 

Platform features – Not Infrastructure as a Service (i.e. Amazon AWS) – Sandboxed – NoSQL distributed datastore + memcache – Many services (task queues, image manipulation…) APIs for… – Java (And other JVM languages) – Python – Go (beta)   ? 

Drawbacks – Not all of Java is available (sandbox) – Only communicate via HTTP/HTTPS + – Read-only file system – Must finish processing within 30 seconds Except for new backends Advantages – It will scale! – Pay only for what you need – Super-easy and fast deployment   ? 

Billing model Free! – 500Mb storage – 5M page views/month Billing enabled   ? 

Admin console   ? 

Hit the ground running: Your first GAE app    ? 

  ? 

  ? 

  ? 

  ? 

The datastore NoSQL (Roughly: a fancy hashmap) Optimistic concurrency – No locking: try first, fail later if things go wrong Multitenancy Memcache (Use it!) Default Java API: JDO or JPA – Get cover! Much better: Objectify (OSS project)   ?  

  ? 

  ? 

Transactions Each entity has an entity group By default, each entity is in a group of its own Transactions are restricted to one entity group  By default, transactions are restricted to a single entity!   ? 

Everything in one Entity Group? Bad idea! – AppEngine limits the number of requests per second on a given entity group. – Contention: every request wants the same group So design your entity groups carefully – The default (each entity in its group) often works   ? 

Entity groups design Decide them when designing your data model – Address and phone have coupled transactions? Same group! Grouping is a bit weird: choose one entity as the parent of the other. – Not necessarily a “real” parent-child relationship – No “cascading deletes”   ? 

The components   ? 

Persistable Entities Basic Java types (String, int, etc.) Date Blob (binary) , GeoPt, PhoneNumber, etc. Key List<>, Set<>, or arrays of the AnySerializableEntity   ? 

  ? 

Accessing entities put(), get(), query(), delete()   ? 

Optimization Get/put/delete multiple keys at once Asynchronous fetches for concurrent queries Fetch only keys when needed   ? 

Using the memcache Simply annotate the entity Optimized for read-intensive apps – Write-through Caches negative results to Caches get(), put() and delete(), not query(). Can go out-of-sync in some situations – Not for entities requiring rigorous data integrity   ? 

Useful trick: counters Remember: AppEngine limits the number of requests per second on a given entity group. A counter  many “read-increment-write”! The trick: a sharded counter – Create many counters – Pick one randomly, increment it – At the end, collect them all and sum them up Why it works? AppEngine has very fast read! Same idea: sharded lists   ? 

Queries NoSQL: only allows efficient queries – No table scans – No in-memory sorts – No joins (almost) Queries only allowed on indexed properties Allow “merge-join” queries: Horn 4 legs Spotted Cows!   ? 

Indexes List of entities sorted by a given field – Allows fast dichotomic search By default all fields are control that – Use on fields or classes Manual indexes – Specify more than one field to sort Ex: Sort by gender then by age – Needed for some complex queries   ? 

Complex queries income > and age < 30 – Not allowed! Inequalities on two fields gender = f and age > 18 and age < 25 – Allowed! Two inequalities on the same field – Needs a manual index (equality + inequality) Sort by gender, then by age all, sorted by decreasing age – Allowed, needs a manual index (reverse sort)   ? 

Optimization Index only the fields you need Index only the values you need! boolean admin; Try to limit manual indexes Avoid manual indexes on many List<> fields! Exploding indexes!   ? 

Useful trick: full text search Full text search not available out-of-the-box Build a KeywordIndex table – KeywordIndex entity is a [keyword, entityId] pair – Normalize keywords (uppercase, no diacritics…) When searching for a prefix: – ofy().query(Customer.class).filter("keyword >=", prefix).filter("keyword <=", prefix + "\ufffd").list();   ? 

Task queues Work outside of a user request – Still need to be initiated by a user request Organize works in small discrete tasks – Again: split it up to make it scalable 10 minutes deadline (instead of 30s) Examples: – notifications – schema migration   ?  

Push queue vs Pull queue Push queue – Meant to be consumed by your AppEngine app – Dispatching managed by AppEngine Pull queue new! – Meant to be consumed externally (REST) or on an AppEngine backend – Consume the tasks when you’re ready – Your task consumer must scale!   ? 

Configuring a Pull Queue In queue.xml            ? 

Enqueing a task Or: getQueue(name)   ? 

Mapper API The “map” part of “mapreduce” Run a task on all the entities of a given type in the datastore Just configure the MapReduceServlet   ? 

Configure a new mapper   ? 

The mapper class   ? 

Launching the mapper   ? 

Overview of other services URL Fetch Mail / XMPP (Google Talk) OAuth, OpenID, Google Accounts Image manipulation Channel API Blobstore   ?  

URL Fetch Access other web resources (REST Apis, etc.) – Only http/https – Maximum deadline of 10 seconds – Synchronous or asynchronous Use standard java.net.URLConnection Low-level AppEngine API has more features   ? 

Channel API Enables COMET on AppEngine – Only for javascript clients   ? 

Channel API   ? 

Blobstore Objects up to 2 Gb Useful for videos or large images User use a form to upload to the blobstore Can serve back the blob later   ? 

Conclusion Platform-as-a-Service – Learn the platform – Constraints are often opportunities – Work with it, not against Still in active development – No https on custom domain A great way to learn what is needed to build a scalable app. – Try your hand at the free version!

Hands on? Google Web Toolkit and the Model View Presenter Architecture Tomorrow, 11am, Camstasia Google Web Toolkit and the Model View Presenter Architecture