SlideShare a Scribd company logo
Building Scalable Apps using Google App Engine Pranav Prakash bit.ly/scalableapps PyCon India 2010
Agenda Scalabality Introduction to Google App Engine Hello World App Engine DataStore Cache Scalability Revisited Case Study Q-n-A
Scalability Scaling Up Scaling Out
Google App Engine Develop, Deploy web apps on Google's Infrastructure Application Environment Sandbox Environment Runtime Environment Python Java DataStore Google Accounts Services Cron Jobs and Task Queues
Hello World :) from  google.appengine.ext  import  webapp from  google.appengine.ext.webapp.util  import  run_wsgi_app class  MainPage(webapp.RequestHandler): def  get(self):    self.response.headers[' Content-Type '] = ' text/plain '    self.response.out.write(' Hello, webapp World! ') application = webapp.WSGIApplication(                                           [(' / ', MainPage)],                                           debug= True ) def  main():    run_wsgi_app(application) if  __name__  == " __main__ ":    main()
app.yaml application : helloworld version : 1 runtime : python api_version : 1 handlers : -  url : /.*    script : helloworld.py
App Engine Datastore Scalable data storage for your applications Write once, read many Stores data entities with properties, organised by application defined Kinds Queries on entities of same kind Filter and sort order on property values and keys Pre-Indexing
Entities and Models Datastore Entity = key + set(attributes) Models describe the kind of data an app uses from  google.appengine.ext  import  db import  datetime class  Person(db.Model):    name = db.StringProperty(required= True )     birthdate = db.DateProperty()    height = db.IntegerProperty()    is_admin = db.BooleanProperty(default= False ) ted = Person(key_name='person_ted',                      name=' Ted ',                       birthdate=datetime.datetime(1986,12,04),                      height = 185) db.put(ted)
Entity Groups, Ancestors and Path Entities residing in same part of the distributed network Transactions Parent Child relationship Path and Key uniqueness
Fetching Entities GQL GqlQuery Query db.get() all_teds = Person.gql( “ WHERE name = :1 ” ,  “ Ted ” ).fetch(100) all_teds_1 = GqlQuery( “ SELECT * FROM Person WHERE name = :1 ” ,  “ Ted ” ).fetch(100) all_teds = Person.all().filter( “ name =  “ ,  “ Ted ” ).fetch(100) specific_ted = Person.get_by_key_name(' person_ted ') specific_teds_key = db.Key(' Person ', ' person_ted ') specfic_ted_1 = db.get(specific_ted_key)
Cache Memcache App Caching
Scalability Revisited Read and Write Infrequently Keys, Key Names, ID Batch Reads and Writes Small Entity Groups Sharding Memcache
Case Study Social apps and games from Oxylabs
bit.ly/scalableapps pranny @ gmail.com

More Related Content

What's hot (8)

PDF
Incremental Type Safety in React Apollo
Evans Hauser
 
PDF
Getting your data in and out of elasticsearch: let me count the ways
🥑 Jay Miller
 
PDF
ReactでGraphQLを使っている
Takahiro Kobaru
 
PPTX
Example asset
Sun Malen
 
ODP
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Mir Nazim
 
PDF
자마린.안드로이드 기본 내장레이아웃(Built-In List Item Layouts)
탑크리에듀(구로디지털단지역3번출구 2분거리)
 
PDF
Spark for Reactive Machine Learning: Building Intelligent Agents at Scale
Jeff Smith
 
PDF
Web Scraping is BS
John D
 
Incremental Type Safety in React Apollo
Evans Hauser
 
Getting your data in and out of elasticsearch: let me count the ways
🥑 Jay Miller
 
ReactでGraphQLを使っている
Takahiro Kobaru
 
Example asset
Sun Malen
 
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Mir Nazim
 
자마린.안드로이드 기본 내장레이아웃(Built-In List Item Layouts)
탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Spark for Reactive Machine Learning: Building Intelligent Agents at Scale
Jeff Smith
 
Web Scraping is BS
John D
 

Similar to PyCon India 2010 Building Scalable apps using appengine (20)

PPTX
PyCon APAC - Django Test Driven Development
Tudor Munteanu
 
PPTX
S03 hybrid app_and_gae_datastore_v1.0
Sun-Jin Jang
 
PDF
Gae Meets Django
fool2nd
 
PPTX
Googleappengineintro 110410190620-phpapp01
Tony Frame
 
PDF
Data Seeding via Parameterized API Requests
RapidValue
 
PDF
Using Task Queues and D3.js to build an analytics product on App Engine
River of Talent
 
PDF
Oleksandr Tolstykh
CodeFest
 
PDF
Java Web Programming on Google Cloud Platform [2/3] : Datastore
IMC Institute
 
PDF
The Big Picture and How to Get Started
guest1af57e
 
PPTX
RailsConf 2010: From 1 to 30 - How to refactor one monolithic application int...
jpalley
 
PPT
Google Gears
silenceIT Inc.
 
PDF
Android best practices
Jose Manuel Ortega Candel
 
PDF
mobl
zefhemel
 
PPTX
Designing REST API automation tests in Kotlin
Dmitriy Sobko
 
KEY
CouchDB on Android
Sven Haiges
 
PDF
Green dao
Droidcon Berlin
 
PDF
Introduction to Datastore
Software Park Thailand
 
PDF
Introduction to Django
Joaquim Rocha
 
PDF
A Basic Django Introduction
Ganga Ram
 
PyCon APAC - Django Test Driven Development
Tudor Munteanu
 
S03 hybrid app_and_gae_datastore_v1.0
Sun-Jin Jang
 
Gae Meets Django
fool2nd
 
Googleappengineintro 110410190620-phpapp01
Tony Frame
 
Data Seeding via Parameterized API Requests
RapidValue
 
Using Task Queues and D3.js to build an analytics product on App Engine
River of Talent
 
Oleksandr Tolstykh
CodeFest
 
Java Web Programming on Google Cloud Platform [2/3] : Datastore
IMC Institute
 
The Big Picture and How to Get Started
guest1af57e
 
RailsConf 2010: From 1 to 30 - How to refactor one monolithic application int...
jpalley
 
Google Gears
silenceIT Inc.
 
Android best practices
Jose Manuel Ortega Candel
 
mobl
zefhemel
 
Designing REST API automation tests in Kotlin
Dmitriy Sobko
 
CouchDB on Android
Sven Haiges
 
Green dao
Droidcon Berlin
 
Introduction to Datastore
Software Park Thailand
 
Introduction to Django
Joaquim Rocha
 
A Basic Django Introduction
Ganga Ram
 
Ad

More from Pranav Prakash (20)

PDF
Data engineering track module 2
Pranav Prakash
 
PDF
Data engineering track module 2
Pranav Prakash
 
PDF
Machine Learning Introduction
Pranav Prakash
 
PDF
Test document
Pranav Prakash
 
PPT
Webtech1b
Pranav Prakash
 
PDF
Solidry @ bakheda2
Pranav Prakash
 
PDF
To Infinity and Beyond - OSDConf2014
Pranav Prakash
 
PDF
#comments
Pranav Prakash
 
PDF
Ibm haifa.mq.final
Pranav Prakash
 
TXT
Apple banana oranges_peaches
Pranav Prakash
 
TXT
Oranges
Pranav Prakash
 
TXT
Oranges peaches
Pranav Prakash
 
TXT
Banana
Pranav Prakash
 
TXT
Banana peaches
Pranav Prakash
 
TXT
Banana oranges
Pranav Prakash
 
TXT
Banana oranges peaches
Pranav Prakash
 
TXT
Apple
Pranav Prakash
 
TXT
Apple peaches
Pranav Prakash
 
TXT
Apple oranges
Pranav Prakash
 
TXT
Apple oranges peaches
Pranav Prakash
 
Data engineering track module 2
Pranav Prakash
 
Data engineering track module 2
Pranav Prakash
 
Machine Learning Introduction
Pranav Prakash
 
Test document
Pranav Prakash
 
Webtech1b
Pranav Prakash
 
Solidry @ bakheda2
Pranav Prakash
 
To Infinity and Beyond - OSDConf2014
Pranav Prakash
 
#comments
Pranav Prakash
 
Ibm haifa.mq.final
Pranav Prakash
 
Apple banana oranges_peaches
Pranav Prakash
 
Oranges peaches
Pranav Prakash
 
Banana peaches
Pranav Prakash
 
Banana oranges
Pranav Prakash
 
Banana oranges peaches
Pranav Prakash
 
Apple peaches
Pranav Prakash
 
Apple oranges
Pranav Prakash
 
Apple oranges peaches
Pranav Prakash
 
Ad

Recently uploaded (20)

PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
Français Patch Tuesday - Juillet
Ivanti
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Français Patch Tuesday - Juillet
Ivanti
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
July Patch Tuesday
Ivanti
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 

PyCon India 2010 Building Scalable apps using appengine

  • 1. Building Scalable Apps using Google App Engine Pranav Prakash bit.ly/scalableapps PyCon India 2010
  • 2. Agenda Scalabality Introduction to Google App Engine Hello World App Engine DataStore Cache Scalability Revisited Case Study Q-n-A
  • 4. Google App Engine Develop, Deploy web apps on Google's Infrastructure Application Environment Sandbox Environment Runtime Environment Python Java DataStore Google Accounts Services Cron Jobs and Task Queues
  • 5. Hello World :) from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self):    self.response.headers[' Content-Type '] = ' text/plain '    self.response.out.write(' Hello, webapp World! ') application = webapp.WSGIApplication(                                          [(' / ', MainPage)],                                          debug= True ) def main():    run_wsgi_app(application) if __name__ == " __main__ ":    main()
  • 6. app.yaml application : helloworld version : 1 runtime : python api_version : 1 handlers : - url : /.*    script : helloworld.py
  • 7. App Engine Datastore Scalable data storage for your applications Write once, read many Stores data entities with properties, organised by application defined Kinds Queries on entities of same kind Filter and sort order on property values and keys Pre-Indexing
  • 8. Entities and Models Datastore Entity = key + set(attributes) Models describe the kind of data an app uses from google.appengine.ext import db import datetime class Person(db.Model):    name = db.StringProperty(required= True )     birthdate = db.DateProperty()    height = db.IntegerProperty()    is_admin = db.BooleanProperty(default= False ) ted = Person(key_name='person_ted',                      name=' Ted ',                      birthdate=datetime.datetime(1986,12,04),                      height = 185) db.put(ted)
  • 9. Entity Groups, Ancestors and Path Entities residing in same part of the distributed network Transactions Parent Child relationship Path and Key uniqueness
  • 10. Fetching Entities GQL GqlQuery Query db.get() all_teds = Person.gql( “ WHERE name = :1 ” , “ Ted ” ).fetch(100) all_teds_1 = GqlQuery( “ SELECT * FROM Person WHERE name = :1 ” , “ Ted ” ).fetch(100) all_teds = Person.all().filter( “ name = “ , “ Ted ” ).fetch(100) specific_ted = Person.get_by_key_name(' person_ted ') specific_teds_key = db.Key(' Person ', ' person_ted ') specfic_ted_1 = db.get(specific_ted_key)
  • 12. Scalability Revisited Read and Write Infrequently Keys, Key Names, ID Batch Reads and Writes Small Entity Groups Sharding Memcache
  • 13. Case Study Social apps and games from Oxylabs