SlideShare una empresa de Scribd logo
1 de 51
Descargar para leer sin conexión
What is App Engine?

Ikai Lan
OSCON
July 21st, 2010
Twitter: @ikai
Agenda
Topics we'll cover
 Why App Engine?
    Traditional web stack scalability
    App Engine to the rescue!
 Services and APIs
 Deployment steps
 App Engine and Open Source
 Questions and Next Steps
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
The Cloud Computing Landscape



                           SaaS

                           PaaS


                             IaaS


Source: Gartner AADI Summit Dec 2009
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




        (Can also use the launcher for Windows and OS X)
Deploying the application
 Set application identifier
 Run deploy script
 You're live!
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>
    ''')
Running the deploy script


$ appcfg.py update helloworld
Scanning files on local disk.
Initiating update.
Email: ...
You're live!
Google App Engine and Open Source
TyphoonAE: Open Source implementation
Open Source JVM language runtimes
 Clojure
 Practical Lisp on the JVM
 JRuby/Mirah
 Ruby on the JVM. Mirah = Ruby-like language that
 compiles to Java (speed!)
 Groovy
 Dynamically typed Java-like language
 Scala
 Strongly typed, functional imperative
 Jython
 Java implementation of Python
Open Source Persistence Frameworks
 Objectify
 http://code.google.com/p/objectify-appengine/
 Twig
 http://code.google.com/p/twig-persist/
 Slim3 (popular in Japan)
 http://sites.google.com/site/slim3appengine/
 SimpleDS
 http://code.google.com/p/simpleds/
 Django-nonrel
 http://www.allbuttonspressed.com/projects/django-
 nonrel
Official features
 Datanucleus JDO/JPA
 http://code.google.com/p/datanucleus-appengine/
 App Engine Map/Reduce
 http://code.google.com/p/appengine-mapreduce/
 Python SDK
 Java SDK - soon!
Questions and Next Steps
Code 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()
Next steps

 Download the SDK
    http://code.google.com/appengine
 Do the codelab
    http://code.google.com/appengine
 Register for an Appspot account
    https://appengine.google.com
 Get this presentation
    http://slideshare.net/ikailan

Más contenido relacionado

La actualidad más candente

Sp2010 high availlability
Sp2010 high availlabilitySp2010 high availlability
Sp2010 high availlabilitySamuel Zürcher
 
10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websites10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websitesoazabir
 
Java EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolithJava EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolithMarkus Eisele
 
Portfolio
PortfolioPortfolio
Portfolioaddl D
 
Integration Testing on Steroids: Run Your Tests on the Real Things
Integration Testing on Steroids: Run Your Tests on the Real ThingsIntegration Testing on Steroids: Run Your Tests on the Real Things
Integration Testing on Steroids: Run Your Tests on the Real ThingsAtlassian
 
(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...
(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...
(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...Amazon Web Services
 
Sp2010 high availlability_sql
Sp2010 high availlability_sqlSp2010 high availlability_sql
Sp2010 high availlability_sqlSamuel Zürcher
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabricMark Ginnebaugh
 
SPS Belgium 2012 - End to End Security for SharePoint Farms - Michael Noel
SPS Belgium 2012 - End to End Security for SharePoint Farms - Michael NoelSPS Belgium 2012 - End to End Security for SharePoint Farms - Michael Noel
SPS Belgium 2012 - End to End Security for SharePoint Farms - Michael NoelMichael Noel
 
Tips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC ApplicationsTips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC ApplicationsSarvesh Kushwaha
 
Cloud Computing: Changing the software business
Cloud Computing: Changing the software businessCloud Computing: Changing the software business
Cloud Computing: Changing the software businessSoftware Park Thailand
 
Turbo Enterprise Web 2.0 Ajax World 20081
Turbo Enterprise Web 2.0 Ajax World 20081Turbo Enterprise Web 2.0 Ajax World 20081
Turbo Enterprise Web 2.0 Ajax World 20081rajivmordani
 
Why NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB AtlasWhy NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB AtlasDatavail
 
Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?Robert MacLean
 
Salesforce Lightning Web Components Overview
Salesforce Lightning Web Components OverviewSalesforce Lightning Web Components Overview
Salesforce Lightning Web Components OverviewNagarjuna Kaipu
 
A Real World Guide to Building Highly Available Fault Tolerant SharePoint Farms
A Real World Guide to Building Highly Available Fault Tolerant SharePoint FarmsA Real World Guide to Building Highly Available Fault Tolerant SharePoint Farms
A Real World Guide to Building Highly Available Fault Tolerant SharePoint FarmsEric Shupps
 
SharePoint Performance Optimization In 10 Steps for the IT Professional
SharePoint Performance Optimization In 10 Steps for the IT ProfessionalSharePoint Performance Optimization In 10 Steps for the IT Professional
SharePoint Performance Optimization In 10 Steps for the IT ProfessionalJoel Oleson
 
SEASPC 2011 - SharePoint Security in an Insecure World: Understanding the Fiv...
SEASPC 2011 - SharePoint Security in an Insecure World: Understanding the Fiv...SEASPC 2011 - SharePoint Security in an Insecure World: Understanding the Fiv...
SEASPC 2011 - SharePoint Security in an Insecure World: Understanding the Fiv...Michael Noel
 
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
 

La actualidad más candente (20)

Sp2010 high availlability
Sp2010 high availlabilitySp2010 high availlability
Sp2010 high availlability
 
10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websites10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websites
 
Java EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolithJava EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolith
 
Portfolio
PortfolioPortfolio
Portfolio
 
Integration Testing on Steroids: Run Your Tests on the Real Things
Integration Testing on Steroids: Run Your Tests on the Real ThingsIntegration Testing on Steroids: Run Your Tests on the Real Things
Integration Testing on Steroids: Run Your Tests on the Real Things
 
(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...
(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...
(APP402) Serving Billions of Web Requests Each Day with Elastic Beanstalk | A...
 
Sp2010 high availlability_sql
Sp2010 high availlability_sqlSp2010 high availlability_sql
Sp2010 high availlability_sql
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabric
 
SPS Belgium 2012 - End to End Security for SharePoint Farms - Michael Noel
SPS Belgium 2012 - End to End Security for SharePoint Farms - Michael NoelSPS Belgium 2012 - End to End Security for SharePoint Farms - Michael Noel
SPS Belgium 2012 - End to End Security for SharePoint Farms - Michael Noel
 
Tips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC ApplicationsTips and Tricks For Faster Asp.NET and MVC Applications
Tips and Tricks For Faster Asp.NET and MVC Applications
 
Cloud Computing: Changing the software business
Cloud Computing: Changing the software businessCloud Computing: Changing the software business
Cloud Computing: Changing the software business
 
Turbo Enterprise Web 2.0 Ajax World 20081
Turbo Enterprise Web 2.0 Ajax World 20081Turbo Enterprise Web 2.0 Ajax World 20081
Turbo Enterprise Web 2.0 Ajax World 20081
 
Why NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB AtlasWhy NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB Atlas
 
Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?
 
Salesforce Lightning Web Components Overview
Salesforce Lightning Web Components OverviewSalesforce Lightning Web Components Overview
Salesforce Lightning Web Components Overview
 
A Real World Guide to Building Highly Available Fault Tolerant SharePoint Farms
A Real World Guide to Building Highly Available Fault Tolerant SharePoint FarmsA Real World Guide to Building Highly Available Fault Tolerant SharePoint Farms
A Real World Guide to Building Highly Available Fault Tolerant SharePoint Farms
 
SharePoint Performance Optimization In 10 Steps for the IT Professional
SharePoint Performance Optimization In 10 Steps for the IT ProfessionalSharePoint Performance Optimization In 10 Steps for the IT Professional
SharePoint Performance Optimization In 10 Steps for the IT Professional
 
SEASPC 2011 - SharePoint Security in an Insecure World: Understanding the Fiv...
SEASPC 2011 - SharePoint Security in an Insecure World: Understanding the Fiv...SEASPC 2011 - SharePoint Security in an Insecure World: Understanding the Fiv...
SEASPC 2011 - SharePoint Security in an Insecure World: Understanding the Fiv...
 
What’s New in Amazon Aurora
What’s New in Amazon AuroraWhat’s New in Amazon Aurora
What’s New in Amazon Aurora
 
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
 

Similar a What is App Engine? O

Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Google AppEngine @Open World Forum 2012 - 12 oct.2012
Google AppEngine @Open World Forum 2012 - 12 oct.2012Google AppEngine @Open World Forum 2012 - 12 oct.2012
Google AppEngine @Open World Forum 2012 - 12 oct.2012Paris Open Source Summit
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
App engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycApp engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycChris Schalk
 
Introduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform TechnologiesIntroduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform TechnologiesChris Schalk
 
Javaedge 2010-cschalk
Javaedge 2010-cschalkJavaedge 2010-cschalk
Javaedge 2010-cschalkChris Schalk
 
App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munichdion
 
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 BusinessChris 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
 
Introduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesIntroduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesChris Schalk
 
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
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...e-Legion
 
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
 
Cloud computing overview & running your code on Google Cloud
Cloud computing overview & running your code on Google CloudCloud computing overview & running your code on Google Cloud
Cloud computing overview & running your code on Google Cloudwesley chun
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10Chris Schalk
 
What is Google App Engine
What is Google App EngineWhat is Google App Engine
What is Google App EngineChris Schalk
 
Continuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventJohn Schneider
 
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Amazon Web Services
 
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 editionDaniel Zivkovic
 

Similar a What is App Engine? O (20)

Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
OWF12/Java Moussine pouchkine Girard
OWF12/Java  Moussine pouchkine GirardOWF12/Java  Moussine pouchkine Girard
OWF12/Java Moussine pouchkine Girard
 
Google AppEngine @Open World Forum 2012 - 12 oct.2012
Google AppEngine @Open World Forum 2012 - 12 oct.2012Google AppEngine @Open World Forum 2012 - 12 oct.2012
Google AppEngine @Open World Forum 2012 - 12 oct.2012
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
App engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycApp engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nyc
 
Introduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform TechnologiesIntroduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform Technologies
 
Javaedge 2010-cschalk
Javaedge 2010-cschalkJavaedge 2010-cschalk
Javaedge 2010-cschalk
 
App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munich
 
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
 
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...
 
Introduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesIntroduction to Google's Cloud Technologies
Introduction to Google's Cloud Technologies
 
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)
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
 
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)
 
Cloud computing overview & running your code on Google Cloud
Cloud computing overview & running your code on Google CloudCloud computing overview & running your code on Google Cloud
Cloud computing overview & running your code on Google Cloud
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10
 
What is Google App Engine
What is Google App EngineWhat is Google App Engine
What is Google App Engine
 
Continuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:Invent
 
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
 
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
 

Más de ikailan

Your language doesn't scale
Your language doesn't scaleYour language doesn't scale
Your language doesn't scaleikailan
 
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 daysikailan
 
2011 july-nyc-gtug-go
2011 july-nyc-gtug-go2011 july-nyc-gtug-go
2011 july-nyc-gtug-goikailan
 
2011 july-gtug-high-replication-datastore
2011 july-gtug-high-replication-datastore2011 july-gtug-high-replication-datastore
2011 july-gtug-high-replication-datastoreikailan
 
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 2011ikailan
 
2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathon2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathonikailan
 
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 Goikailan
 
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 mongodbikailan
 
Introducing the App Engine datastore
Introducing the App Engine datastoreIntroducing the App Engine datastore
Introducing the App Engine datastoreikailan
 
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 2010ikailan
 
Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngineikailan
 

Más de ikailan (11)

Your language doesn't scale
Your language doesn't scaleYour language doesn't scale
Your language doesn't scale
 
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
 
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
 
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
 
2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathon2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathon
 
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
 
Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngine
 

What is App Engine? O

  • 1. What is App Engine? Ikai Lan OSCON July 21st, 2010 Twitter: @ikai
  • 2. Agenda Topics we'll cover Why App Engine? Traditional web stack scalability App Engine to the rescue! Services and APIs Deployment steps App Engine and Open Source Questions and Next Steps
  • 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. The Cloud Computing Landscape SaaS PaaS IaaS Source: Gartner AADI Summit Dec 2009
  • 15. App Engine Developers/Apps Google Confidential and Proprietary
  • 16. Google Confidential and Proprietary
  • 17. By the numbers Over 100,000 applications 250,000 developers Over 250 million daily pageviews
  • 19. App Engine Components Load balancing Routing Hosts static content Separate from programming files Google Confidential and Proprietary
  • 20. 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
  • 22. 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
  • 23. Memcache Distributed, very fast, in-memory cache Optimistic caching Very stable, robust and specialized Google Confidential and Proprietary
  • 24. URL Fetch Simple, HTTP communication HTTP GET/POST to external service Allows integration with third-party REST APIs Google Confidential and Proprietary
  • 25. Mail Inbound and outbound mail Outbound mail Inbound mail handling Attachment processing Google Confidential and Proprietary
  • 26. XMPP Instant messaging for your application Incoming and outgoing XMPP No need to worry about setting up servers Google Confidential and Proprietary
  • 27. Task Queue Background and scheduled computation Background processing infrastructure Scheduled jobs Automatic handling of queuing and job polling Google Confidential and Proprietary
  • 28. Images Image manipulation Resize Crop Image compositions Google Confidential and Proprietary
  • 29. Blobstore Heavy lifting for large files Upload and distribute large files Programmatic access to file contents Google Confidential and Proprietary
  • 30. User Accounts Federated login for your application Google Accounts or OpenID Administrator management No need to create user management system Google Confidential and Proprietary
  • 32. 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!
  • 33. 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):
  • 34. Project contents app.yaml – main configuration file index.yaml – automatically generated to index your data main.py – your main application "controller" code goes here
  • 36. Local development server $ dev_appserver.py helloworld (Can also use the launcher for Windows and OS X)
  • 37. Deploying the application Set application identifier Run deploy script You're live!
  • 38. 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 ...
  • 39. 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('/')
  • 40. 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> ''')
  • 41. Running the deploy script $ appcfg.py update helloworld Scanning files on local disk. Initiating update. Email: ...
  • 43. Google App Engine and Open Source
  • 44. TyphoonAE: Open Source implementation
  • 45. Open Source JVM language runtimes Clojure Practical Lisp on the JVM JRuby/Mirah Ruby on the JVM. Mirah = Ruby-like language that compiles to Java (speed!) Groovy Dynamically typed Java-like language Scala Strongly typed, functional imperative Jython Java implementation of Python
  • 46. Open Source Persistence Frameworks Objectify http://code.google.com/p/objectify-appengine/ Twig http://code.google.com/p/twig-persist/ Slim3 (popular in Japan) http://sites.google.com/site/slim3appengine/ SimpleDS http://code.google.com/p/simpleds/ Django-nonrel http://www.allbuttonspressed.com/projects/django- nonrel
  • 47. Official features Datanucleus JDO/JPA http://code.google.com/p/datanucleus-appengine/ App Engine Map/Reduce http://code.google.com/p/appengine-mapreduce/ Python SDK Java SDK - soon!
  • 50. 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()
  • 51. Next steps Download the SDK http://code.google.com/appengine Do the codelab http://code.google.com/appengine Register for an Appspot account https://appengine.google.com Get this presentation http://slideshare.net/ikailan