SlideShare a Scribd company logo
App Engine 101

Ikai Lan
May 17th, 2010
Agenda
Topics we'll cover
 Why App Engine?
    Traditional web stack scalability
    App Engine to the rescue!
 Services and APIs
 Code preview
    Guestbook sample
    Codelab preview
What is Google App Engine?
Google App Engine is...


                ... a way for you to run
                your web applications
                 on Google’s scalable
                      infrastructure.



                             Google’s Data Centers
Start with... the basic LAMP stack


LAMP:
   Linux
   Apache
   MySql
   Programming Language
        (PHP, Python, Perl, etc.)




NOT Scalable

Single Point of Failure (SPOF)


                                     Google Confidential and Proprietary
Database on a separate server



Still not Scalable!


TWO Single Points of Failure




                                Google Confidential and Proprietary
Multiple Web Servers




              Now you need Load Balancing

          Database is still Single Point of Failure

                                               Google Confidential and Proprietary
Round Robin Load Balancing




              Register list of IPs with DNS

     DNS record is cached with a Time to Live (TTL)

                                              Google Confidential and Proprietary
Round Robin Load Balancing




But the TTL takes time to propagate and might not be respected

So if a machine goes down... :-(

And the database is still SPOF
                                                     Google Confidential and Proprietary
Master Slave Database




:-) Better read throughput   :-( Master is SPOF for writes

                             :-( Master may die before replication


                                                   Google Confidential and Proprietary
Partitioned Database




:-) Better R/W throughput   :-( More machines, more management

                            :-( Re-architect data model

                            :-( Rewrite queries
                                                    Google Confidential and Proprietary
Why build it all yourself?




                             Google Confidential and Proprietary
Why not use Google App Engine?




            Simple application configuration

              No systems administration

                No performance tuning

               AUTOMATIC SCALING!
                                               Google Confidential and Proprietary
App Engine Developers/Apps




                             Google Confidential and Proprietary
Google Confidential and Proprietary
By the numbers

 Over 100,000 applications
 250,000 developers
 Over 250 million daily pageviews
Underneath the hood
App Engine Components



                                  Load balancing

                                  Routing




Hosts static content

Separate from programming files




                                              Google Confidential and Proprietary
App Engine Components

                        Hosts application code

                        Handles concurrent requests

                        Enforces isolation for app safety

                        Maintains statelessness




Multiple Runtimes


                                       Copyright © Sun Microsystems Inc. All rights reserved.

                                                  Google Confidential and Proprietary
App Engine Services/APIs
Bigtable - The App Engine datastore



                           Distributed, partitioned datastore




Arbitrary horizontal scaling - scales to “Internet scale”

Replicated and fault tolerant

Parallel processing

Predictable query performance

No deadlocks
                                                      Google Confidential and Proprietary
Memcache




                              Distributed, very fast,
                                in-memory cache




Optimistic caching

Very stable, robust and specialized



                                                    Google Confidential and Proprietary
URL Fetch




                          Simple, HTTP communication




HTTP GET/POST to external service

Allows integration with third-party REST APIs



                                                Google Confidential and Proprietary
Mail




                        Inbound and outbound mail




Outbound mail

Inbound mail handling

Attachment processing

                                              Google Confidential and Proprietary
XMPP




                       Instant messaging for your application




Incoming and outgoing XMPP

No need to worry about setting up servers



                                                    Google Confidential and Proprietary
Task Queue




                           Background and scheduled
                                 computation




Background processing infrastructure

Scheduled jobs

Automatic handling of queuing and job polling

                                                Google Confidential and Proprietary
Images




                     Image manipulation




Resize

Crop

Image compositions

                                          Google Confidential and Proprietary
Blobstore




                             Heavy lifting for large files




Upload and distribute large files

Programmatic access to file contents



                                                       Google Confidential and Proprietary
User Accounts




                      Federated login for your application




Google Accounts or OpenID

Administrator management

No need to create user management system

                                                  Google Confidential and Proprietary
Getting started
Getting started with App Engine

 Download the SDK
    http://code.google.com/appengine
 Register for an Appspot account
    https://appengine.google.com
 Write code - deploy!
Starting a project
  Linux, MacOS, etc. command-line:
    $ dev_appserver.py helloworld # run dev svr
    $ appcfg.py update helloworld # deploy live

  Windows GUI (also avail for Mac):
Project contents




       app.yaml – main configuration file

       index.yaml – automatically
       generated to index your data

       main.py – your main application
       "controller" code goes here
main.py
Local development server
  $ dev_appserver.py helloworld
  INFO 2009-03-04 17:51:22,354 __init__.py]




        (Can also use the launcher for Windows and OS X)
Deploying the application
 Set application identifier
 Run deploy script
 You're live!
Modifying app.yaml

application: helloworld
version: 1
runtime: python
api_version: 1

handlers:
- url: .*
script: main.py
Running the deploy script


$ appcfg.py update helloworld
Scanning files on local disk.
Initiating update.
Email: ...
You're live!
Demo time!
main.py: Skeleton application

from google.appengine.ext import webapp
from google.appengine.ext.webapp import util


class MainHandler(webapp.RequestHandler):
 def get(self):
  self.response.out.write('Hello world!')


def main():
 application = webapp.WSGIApplication([('/', MainHandler)],
                     debug=True)
 util.run_wsgi_app(application)


if __name__ == '__main__':
  main()
main.py: Adding a handler
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainHandler(webapp.RequestHandler):
  def get(self):
    self.response.out.write('<h1>Hello world!</h1>')
    self.response.out.write('''
         <form action="/sign" method=post>
         <input type=text name=content>
         <br><input type=submit value="Sign Guestbook">
         </form>
    ''')

class GuestBook(webapp.RequestHandler):
  def post(self):
    self.response.out.write(
       '<h2>You wrote:</h2> %s' % self.request.get('content')
    )

application = webapp.WSGIApplication([
   ('/', MainHandler),
   ('/sign', GuestBook),
], debug=True)

# start_wsgi_app etc ...
main.py: Persisting to the datastore

class GuestBook(webapp.RequestHandler):
  def post(self):
    greeting = Greeting()
    greeting.content = self.request.get('content')
    greeting.put()
    self.redirect('/')
main.py: Collecting values from the datastore

class MainHandler(webapp.RequestHandler):
  def get(self):
    self.response.out.write('Hello world!')
    self.response.out.write('<h1>My GuestBook</h1><ol>')
    greetings = Greeting.all()
    for greeting in greetings:
         self.response.out.write('<li> %s' % greeting.content)
    self.response.out.write('''
         </ol><hr>
         <form action="/sign" method=post>
         <textarea name=content rows=3 cols=60></textarea>
         <br><input type=submit value="Sign Guestbook">
         </form>
    ''')
Live code!
Next steps

 Download the SDK
    http://code.google.com/appengine
 Register for an Appspot account
     https://appengine.google.com
 Attend the codelab!

More Related Content

What's hot

The API Facade Pattern: Technology - Episode 3
The API Facade Pattern: Technology - Episode 3The API Facade Pattern: Technology - Episode 3
The API Facade Pattern: Technology - Episode 3Apigee | Google Cloud
 
Enterprise Spring Building Scalable Applications
Enterprise Spring Building Scalable ApplicationsEnterprise Spring Building Scalable Applications
Enterprise Spring Building Scalable Applications
Gordon Dickens
 
Mobile APIs in Practice
Mobile APIs in PracticeMobile APIs in Practice
Mobile APIs in Practice
Tyler Singletary
 
Design mobile efficient Apis
Design mobile efficient ApisDesign mobile efficient Apis
Design mobile efficient Apis
Mobile Rtpl
 
Office 365 Groups and Tasks API - Getting Started
Office 365 Groups and Tasks API - Getting StartedOffice 365 Groups and Tasks API - Getting Started
Office 365 Groups and Tasks API - Getting Started
Dragan Panjkov
 
The API Facade Pattern: People - Episode 4
The API Facade Pattern: People - Episode 4The API Facade Pattern: People - Episode 4
The API Facade Pattern: People - Episode 4
Apigee | Google Cloud
 
The API Facade Pattern: Overview - Episode 1
The API Facade Pattern: Overview - Episode 1The API Facade Pattern: Overview - Episode 1
The API Facade Pattern: Overview - Episode 1Apigee | Google Cloud
 
Node's Event Loop From the Inside Out - Sam Roberts, IBM
Node's Event Loop From the Inside Out - Sam Roberts, IBMNode's Event Loop From the Inside Out - Sam Roberts, IBM
Node's Event Loop From the Inside Out - Sam Roberts, IBM
NodejsFoundation
 
Externalized Distributed Configuration Management with Spring Cloud Config-Se...
Externalized Distributed Configuration Management with Spring Cloud Config-Se...Externalized Distributed Configuration Management with Spring Cloud Config-Se...
Externalized Distributed Configuration Management with Spring Cloud Config-Se...
Nikhil Hiremath
 
Deep dive into AWS fargate
Deep dive into AWS fargateDeep dive into AWS fargate
Deep dive into AWS fargate
Amazon Web Services
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
Gordon Dickens
 
Amazon SageMaker를 통한 대용량 모델 훈련 방법 살펴보기 - 김대근 AWS AI/ML 스페셜리스트 솔루션즈 아키텍트 / 최영준...
Amazon SageMaker를 통한 대용량 모델 훈련 방법 살펴보기 - 김대근 AWS AI/ML 스페셜리스트 솔루션즈 아키텍트 / 최영준...Amazon SageMaker를 통한 대용량 모델 훈련 방법 살펴보기 - 김대근 AWS AI/ML 스페셜리스트 솔루션즈 아키텍트 / 최영준...
Amazon SageMaker를 통한 대용량 모델 훈련 방법 살펴보기 - 김대근 AWS AI/ML 스페셜리스트 솔루션즈 아키텍트 / 최영준...
Amazon Web Services Korea
 
Essential API Facade Patterns - Composition (Episode 1)
Essential API Facade Patterns - Composition (Episode 1)Essential API Facade Patterns - Composition (Episode 1)
Essential API Facade Patterns - Composition (Episode 1)Apigee | Google Cloud
 
Ambari Meetup: APIs and SPIs of Ambari
Ambari Meetup: APIs and SPIs of AmbariAmbari Meetup: APIs and SPIs of Ambari
Ambari Meetup: APIs and SPIs of AmbariHortonworks
 
Rails as iOS Application Backend
Rails as iOS Application BackendRails as iOS Application Backend
Rails as iOS Application Backend
maximeguilbot
 
Ambari Meetup: Architecture and Demo
Ambari Meetup: Architecture and DemoAmbari Meetup: Architecture and Demo
Ambari Meetup: Architecture and DemoHortonworks
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
Jimmy Guerrero
 
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQNode.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Joshua Miller
 
Rails and iOS with RestKit
Rails and iOS with RestKitRails and iOS with RestKit
Rails and iOS with RestKitAndrew Culver
 
Apache Ambari BOF - Overview - Hadoop Summit 2013
Apache Ambari BOF - Overview - Hadoop Summit 2013Apache Ambari BOF - Overview - Hadoop Summit 2013
Apache Ambari BOF - Overview - Hadoop Summit 2013
Hortonworks
 

What's hot (20)

The API Facade Pattern: Technology - Episode 3
The API Facade Pattern: Technology - Episode 3The API Facade Pattern: Technology - Episode 3
The API Facade Pattern: Technology - Episode 3
 
Enterprise Spring Building Scalable Applications
Enterprise Spring Building Scalable ApplicationsEnterprise Spring Building Scalable Applications
Enterprise Spring Building Scalable Applications
 
Mobile APIs in Practice
Mobile APIs in PracticeMobile APIs in Practice
Mobile APIs in Practice
 
Design mobile efficient Apis
Design mobile efficient ApisDesign mobile efficient Apis
Design mobile efficient Apis
 
Office 365 Groups and Tasks API - Getting Started
Office 365 Groups and Tasks API - Getting StartedOffice 365 Groups and Tasks API - Getting Started
Office 365 Groups and Tasks API - Getting Started
 
The API Facade Pattern: People - Episode 4
The API Facade Pattern: People - Episode 4The API Facade Pattern: People - Episode 4
The API Facade Pattern: People - Episode 4
 
The API Facade Pattern: Overview - Episode 1
The API Facade Pattern: Overview - Episode 1The API Facade Pattern: Overview - Episode 1
The API Facade Pattern: Overview - Episode 1
 
Node's Event Loop From the Inside Out - Sam Roberts, IBM
Node's Event Loop From the Inside Out - Sam Roberts, IBMNode's Event Loop From the Inside Out - Sam Roberts, IBM
Node's Event Loop From the Inside Out - Sam Roberts, IBM
 
Externalized Distributed Configuration Management with Spring Cloud Config-Se...
Externalized Distributed Configuration Management with Spring Cloud Config-Se...Externalized Distributed Configuration Management with Spring Cloud Config-Se...
Externalized Distributed Configuration Management with Spring Cloud Config-Se...
 
Deep dive into AWS fargate
Deep dive into AWS fargateDeep dive into AWS fargate
Deep dive into AWS fargate
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Amazon SageMaker를 통한 대용량 모델 훈련 방법 살펴보기 - 김대근 AWS AI/ML 스페셜리스트 솔루션즈 아키텍트 / 최영준...
Amazon SageMaker를 통한 대용량 모델 훈련 방법 살펴보기 - 김대근 AWS AI/ML 스페셜리스트 솔루션즈 아키텍트 / 최영준...Amazon SageMaker를 통한 대용량 모델 훈련 방법 살펴보기 - 김대근 AWS AI/ML 스페셜리스트 솔루션즈 아키텍트 / 최영준...
Amazon SageMaker를 통한 대용량 모델 훈련 방법 살펴보기 - 김대근 AWS AI/ML 스페셜리스트 솔루션즈 아키텍트 / 최영준...
 
Essential API Facade Patterns - Composition (Episode 1)
Essential API Facade Patterns - Composition (Episode 1)Essential API Facade Patterns - Composition (Episode 1)
Essential API Facade Patterns - Composition (Episode 1)
 
Ambari Meetup: APIs and SPIs of Ambari
Ambari Meetup: APIs and SPIs of AmbariAmbari Meetup: APIs and SPIs of Ambari
Ambari Meetup: APIs and SPIs of Ambari
 
Rails as iOS Application Backend
Rails as iOS Application BackendRails as iOS Application Backend
Rails as iOS Application Backend
 
Ambari Meetup: Architecture and Demo
Ambari Meetup: Architecture and DemoAmbari Meetup: Architecture and Demo
Ambari Meetup: Architecture and Demo
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQNode.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
 
Rails and iOS with RestKit
Rails and iOS with RestKitRails and iOS with RestKit
Rails and iOS with RestKit
 
Apache Ambari BOF - Overview - Hadoop Summit 2013
Apache Ambari BOF - Overview - Hadoop Summit 2013Apache Ambari BOF - Overview - Hadoop Summit 2013
Apache Ambari BOF - Overview - Hadoop Summit 2013
 

Viewers also liked

Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngineikailan
 
Your language doesn't scale
Your language doesn't scaleYour language doesn't scale
Your language doesn't scale
ikailan
 
プログラミング言語に関する学生へのアンケート
プログラミング言語に関する学生へのアンケートプログラミング言語に関する学生へのアンケート
プログラミング言語に関する学生へのアンケート
Hiroto Yamakawa
 
Intro to App Engine - Agency Dev Day NYC 2011
Intro to App Engine - Agency Dev Day NYC 2011Intro to App Engine - Agency Dev Day NYC 2011
Intro to App Engine - Agency Dev Day NYC 2011
ikailan
 
Eme4401 Digautobio
Eme4401 DigautobioEme4401 Digautobio
Eme4401 DigautobioStef2
 
From 0-1 billion in 46 days
From 0-1 billion in 46 daysFrom 0-1 billion in 46 days
From 0-1 billion in 46 days
ikailan
 
札幌のJavaコミュニティ Java Doを立ち上げた話
札幌のJavaコミュニティ Java Doを立ち上げた話札幌のJavaコミュニティ Java Doを立ち上げた話
札幌のJavaコミュニティ Java Doを立ち上げた話
Hiroto Yamakawa
 
2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathon2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathon
ikailan
 

Viewers also liked (8)

Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngine
 
Your language doesn't scale
Your language doesn't scaleYour language doesn't scale
Your language doesn't scale
 
プログラミング言語に関する学生へのアンケート
プログラミング言語に関する学生へのアンケートプログラミング言語に関する学生へのアンケート
プログラミング言語に関する学生へのアンケート
 
Intro to App Engine - Agency Dev Day NYC 2011
Intro to App Engine - Agency Dev Day NYC 2011Intro to App Engine - Agency Dev Day NYC 2011
Intro to App Engine - Agency Dev Day NYC 2011
 
Eme4401 Digautobio
Eme4401 DigautobioEme4401 Digautobio
Eme4401 Digautobio
 
From 0-1 billion in 46 days
From 0-1 billion in 46 daysFrom 0-1 billion in 46 days
From 0-1 billion in 46 days
 
札幌のJavaコミュニティ Java Doを立ち上げた話
札幌のJavaコミュニティ Java Doを立ち上げた話札幌のJavaコミュニティ Java Doを立ち上げた話
札幌のJavaコミュニティ Java Doを立ち上げた話
 
2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathon2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathon
 

Similar to Boot camp 2010_app_engine_101

Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
Lars Vogel
 
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Ido Green
 
Introduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform TechnologiesIntroduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform Technologies
Chris Schalk
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)
wesley chun
 
App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munich
dion
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
wesley chun
 
Introduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesIntroduction to Google's Cloud Technologies
Introduction to Google's Cloud Technologies
Chris Schalk
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
Lars Vogel
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
e-Legion
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
wesley chun
 
Javaedge 2010-cschalk
Javaedge 2010-cschalkJavaedge 2010-cschalk
Javaedge 2010-cschalkChris Schalk
 
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
apidays
 
App engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycApp engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nyc
Chris Schalk
 
A fresh look at Google’s Cloud by Mandy Waite
A fresh look at Google’s Cloud by Mandy Waite A fresh look at Google’s Cloud by Mandy Waite
A fresh look at Google’s Cloud by Mandy Waite
Codemotion
 
Google App Engine - Overview #1
Google App Engine - Overview #1Google App Engine - Overview #1
Google App Engine - Overview #1
Kay Kim
 
Google Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data editionGoogle Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data edition
Daniel Zivkovic
 
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
Mack Hardy
 
What's new in App Engine and intro to App Engine for Business
What's new in App Engine and intro to App Engine for BusinessWhat's new in App Engine and intro to App Engine for Business
What's new in App Engine and intro to App Engine for Business
Chris Schalk
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
wesley chun
 
Cloud computing overview & Technical intro to Google Cloud
Cloud computing overview & Technical intro to Google CloudCloud computing overview & Technical intro to Google Cloud
Cloud computing overview & Technical intro to Google Cloud
wesley chun
 

Similar to Boot camp 2010_app_engine_101 (20)

Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
 
Introduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform TechnologiesIntroduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform Technologies
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)
 
App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munich
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
 
Introduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesIntroduction to Google's Cloud Technologies
Introduction to Google's Cloud Technologies
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Javaedge 2010-cschalk
Javaedge 2010-cschalkJavaedge 2010-cschalk
Javaedge 2010-cschalk
 
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
 
App engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycApp engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nyc
 
A fresh look at Google’s Cloud by Mandy Waite
A fresh look at Google’s Cloud by Mandy Waite A fresh look at Google’s Cloud by Mandy Waite
A fresh look at Google’s Cloud by Mandy Waite
 
Google App Engine - Overview #1
Google App Engine - Overview #1Google App Engine - Overview #1
Google App Engine - Overview #1
 
Google Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data editionGoogle Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data edition
 
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
 
What's new in App Engine and intro to App Engine for Business
What's new in App Engine and intro to App Engine for BusinessWhat's new in App Engine and intro to App Engine for Business
What's new in App Engine and intro to App Engine for Business
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Cloud computing overview & Technical intro to Google Cloud
Cloud computing overview & Technical intro to Google CloudCloud computing overview & Technical intro to Google Cloud
Cloud computing overview & Technical intro to Google Cloud
 

More from ikailan

2011 july-nyc-gtug-go
2011 july-nyc-gtug-go2011 july-nyc-gtug-go
2011 july-nyc-gtug-go
ikailan
 
2011 july-gtug-high-replication-datastore
2011 july-gtug-high-replication-datastore2011 july-gtug-high-replication-datastore
2011 july-gtug-high-replication-datastore
ikailan
 
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
ikailan
 
Rapid web development using tornado web and mongodb
Rapid web development using tornado web and mongodbRapid web development using tornado web and mongodb
Rapid web development using tornado web and mongodb
ikailan
 
Introducing the App Engine datastore
Introducing the App Engine datastoreIntroducing the App Engine datastore
Introducing the App Engine datastore
ikailan
 
OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010
ikailan
 

More from ikailan (6)

2011 july-nyc-gtug-go
2011 july-nyc-gtug-go2011 july-nyc-gtug-go
2011 july-nyc-gtug-go
 
2011 july-gtug-high-replication-datastore
2011 july-gtug-high-replication-datastore2011 july-gtug-high-replication-datastore
2011 july-gtug-high-replication-datastore
 
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
 
Rapid web development using tornado web and mongodb
Rapid web development using tornado web and mongodbRapid web development using tornado web and mongodb
Rapid web development using tornado web and mongodb
 
Introducing the App Engine datastore
Introducing the App Engine datastoreIntroducing the App Engine datastore
Introducing the App Engine datastore
 
OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010
 

Recently uploaded

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 

Recently uploaded (20)

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 

Boot camp 2010_app_engine_101

  • 1. App Engine 101 Ikai Lan May 17th, 2010
  • 2. Agenda Topics we'll cover Why App Engine? Traditional web stack scalability App Engine to the rescue! Services and APIs Code preview Guestbook sample Codelab preview
  • 3. What is Google App Engine?
  • 4. Google App Engine is... ... a way for you to run your web applications on Google’s scalable infrastructure. Google’s Data Centers
  • 5. Start with... the basic LAMP stack LAMP: Linux Apache MySql Programming Language (PHP, Python, Perl, etc.) NOT Scalable Single Point of Failure (SPOF) Google Confidential and Proprietary
  • 6. Database on a separate server Still not Scalable! TWO Single Points of Failure Google Confidential and Proprietary
  • 7. Multiple Web Servers Now you need Load Balancing Database is still Single Point of Failure Google Confidential and Proprietary
  • 8. Round Robin Load Balancing Register list of IPs with DNS DNS record is cached with a Time to Live (TTL) Google Confidential and Proprietary
  • 9. Round Robin Load Balancing But the TTL takes time to propagate and might not be respected So if a machine goes down... :-( And the database is still SPOF Google Confidential and Proprietary
  • 10. Master Slave Database :-) Better read throughput :-( Master is SPOF for writes :-( Master may die before replication Google Confidential and Proprietary
  • 11. Partitioned Database :-) Better R/W throughput :-( More machines, more management :-( Re-architect data model :-( Rewrite queries Google Confidential and Proprietary
  • 12. Why build it all yourself? Google Confidential and Proprietary
  • 13. Why not use Google App Engine? Simple application configuration No systems administration No performance tuning AUTOMATIC SCALING! Google Confidential and Proprietary
  • 14. App Engine Developers/Apps Google Confidential and Proprietary
  • 15. Google Confidential and Proprietary
  • 16. By the numbers Over 100,000 applications 250,000 developers Over 250 million daily pageviews
  • 18. App Engine Components Load balancing Routing Hosts static content Separate from programming files Google Confidential and Proprietary
  • 19. App Engine Components Hosts application code Handles concurrent requests Enforces isolation for app safety Maintains statelessness Multiple Runtimes Copyright © Sun Microsystems Inc. All rights reserved. Google Confidential and Proprietary
  • 21. Bigtable - The App Engine datastore Distributed, partitioned datastore Arbitrary horizontal scaling - scales to “Internet scale” Replicated and fault tolerant Parallel processing Predictable query performance No deadlocks Google Confidential and Proprietary
  • 22. Memcache Distributed, very fast, in-memory cache Optimistic caching Very stable, robust and specialized Google Confidential and Proprietary
  • 23. URL Fetch Simple, HTTP communication HTTP GET/POST to external service Allows integration with third-party REST APIs Google Confidential and Proprietary
  • 24. Mail Inbound and outbound mail Outbound mail Inbound mail handling Attachment processing Google Confidential and Proprietary
  • 25. XMPP Instant messaging for your application Incoming and outgoing XMPP No need to worry about setting up servers Google Confidential and Proprietary
  • 26. Task Queue Background and scheduled computation Background processing infrastructure Scheduled jobs Automatic handling of queuing and job polling Google Confidential and Proprietary
  • 27. Images Image manipulation Resize Crop Image compositions Google Confidential and Proprietary
  • 28. Blobstore Heavy lifting for large files Upload and distribute large files Programmatic access to file contents Google Confidential and Proprietary
  • 29. User Accounts Federated login for your application Google Accounts or OpenID Administrator management No need to create user management system Google Confidential and Proprietary
  • 31. Getting started with App Engine Download the SDK http://code.google.com/appengine Register for an Appspot account https://appengine.google.com Write code - deploy!
  • 32. Starting a project Linux, MacOS, etc. command-line: $ dev_appserver.py helloworld # run dev svr $ appcfg.py update helloworld # deploy live Windows GUI (also avail for Mac):
  • 33. Project contents app.yaml – main configuration file index.yaml – automatically generated to index your data main.py – your main application "controller" code goes here
  • 35. Local development server $ dev_appserver.py helloworld INFO 2009-03-04 17:51:22,354 __init__.py] (Can also use the launcher for Windows and OS X)
  • 36. Deploying the application Set application identifier Run deploy script You're live!
  • 37. Modifying app.yaml application: helloworld version: 1 runtime: python api_version: 1 handlers: - url: .* script: main.py
  • 38. Running the deploy script $ appcfg.py update helloworld Scanning files on local disk. Initiating update. Email: ...
  • 41. main.py: Skeleton application from google.appengine.ext import webapp from google.appengine.ext.webapp import util class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hello world!') def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) util.run_wsgi_app(application) if __name__ == '__main__': main()
  • 42. main.py: Adding a handler from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('<h1>Hello world!</h1>') self.response.out.write(''' <form action="/sign" method=post> <input type=text name=content> <br><input type=submit value="Sign Guestbook"> </form> ''') class GuestBook(webapp.RequestHandler): def post(self): self.response.out.write( '<h2>You wrote:</h2> %s' % self.request.get('content') ) application = webapp.WSGIApplication([ ('/', MainHandler), ('/sign', GuestBook), ], debug=True) # start_wsgi_app etc ...
  • 43. main.py: Persisting to the datastore class GuestBook(webapp.RequestHandler): def post(self): greeting = Greeting() greeting.content = self.request.get('content') greeting.put() self.redirect('/')
  • 44. main.py: Collecting values from the datastore class MainHandler(webapp.RequestHandler): def get(self): self.response.out.write('Hello world!') self.response.out.write('<h1>My GuestBook</h1><ol>') greetings = Greeting.all() for greeting in greetings: self.response.out.write('<li> %s' % greeting.content) self.response.out.write(''' </ol><hr> <form action="/sign" method=post> <textarea name=content rows=3 cols=60></textarea> <br><input type=submit value="Sign Guestbook"> </form> ''')
  • 46. Next steps Download the SDK http://code.google.com/appengine Register for an Appspot account https://appengine.google.com Attend the codelab!