SlideShare una empresa de Scribd logo
1 de 53
Introduction to
Google App Engine
      Luke Francl
Scaling is
  hard.
He wrote Python
Requests




Servers
Requests




Servers
Requests




Servers
Server   Virtual Server   Process   Request
Server   Virtual Server   Process   Request
App Engine
            Restrictions

•   No access to servers       •   No C extensions

•   Read-only file system       •   No sockets

•   30 second response limit   •   Python, Java, Go

•   Non-relational datastore


                                                      photo:
                                                      Kash_if
EC2 versus App
             EngineApp Engine
            EC2
   Instance   $0.02 - $0.68 (15
                                             $0.08
       Hour   GB RAM, 8x1GHz
                    CPU)            $0.08 - $0.64 (1G RAM,
Background     same as above
                                         4.8GHz CPU)
Autoscaling      with effort               automatic

   Storage     SimpleDB, RDS,     Datastore, Blobstore, Google
                  EBS, S3               Storage (S3 clone)
                                   Python, Java, Go (written for
      Runs       Anything!
                                            GAE's API)
       APIs     S3, SQS, SES,     Storage, BigQuery, Prediction
                 many more                     API
Heroku vs App
            EngineApp Engine
          Heroku
      Free     750 instance
                                  28 instance hours/day
Processing      hours/mo
                $0.05/hour     tasks (run on web instances)
Background
              (no autoscaling)  Backends: $0.08 - $0.68/
             5 MB free, ≈$70/              hour
 Memcache                                  lots!
                    GB
              Ruby, Clojure,
     Runs                            Java, Python, Go
              Java, Node.js,
                 Python                    N/A
       SSL    $5-$100/mo
                                 (site.appspot.com only)
    Deploy       git push           appcfg.py upload
Totally awesome
things about App
     Engine
http://<version>.<app‐id>.appspot.com
Getting Started

                      or   dev_appserver.py




http://code.google.com/appengine/downloads.html
from
google.appengine.ext
import
webapp
class
UserHandler(webapp.RequestHandler):



def
get(self):




key_name
=
self.request.get('user_id')




user
=
User.get_by_key_name(key_name)





html
=
"<html><body><p>hello,
%s</p></body></html>"




self.response.out.write(html
%
user.email)

app
=
webapp.WSGIApplication([('/user',
































UserHandler)])

if
__name__
==
'__main__':






util.run_wsgi_app(app)
webapp = BARE
   BONES!
Substrate
The Datastore




                photo:
class
User(db.Model):




email



=
db.EmailProperty(required=True)




password
=
db.StringProperty(required=True)




age





=
db.IntegerProperty()




website

=
db.LinkProperty()




notes



=
db.TextProperty()


user
=
User(key_name='foobar',













email='look@example.com',












password=encrypt('foobar',
salt),












website='http://example.com')
user.put()
key
=
db.Key.from_path('User',
'foobar',























'Preferences',
123)

prefs
=
Preferences.get(key)

user
=
User.get_by_key_name('foobar')

prefs
=
Preferences.get_by_id(123,






























parent=user)
def
txn(user,
items_per_page,
bg_color):


user.put()


prefs
=
Preferences(parent=user,






















items_per_page=items_per_page,






















bg_color=bg_color)


prefs.put()

user
=
User(key_name='example',












email='user@example.com')

db.run_in_transaction(txn,
user,
100,
'ff0000')
Querying
query
=
User.all()
query.filter("age
>=",
42)
query.order("age")

#
get
list
of
up
to
100
users
users
=
query.fetch(100)

#
iterate
over
all
users
(until
you
run
out
of
time)
for
user
in
query:


#
do
stuff
with
user
Custom Index
            Query
#
requires
custom
index
query
=
User.all()
query.filter("age
>=",
20)
query.filter("website
=",
"http://example.com")

#
index.yaml
indexes:

‐
kind:
User


properties:


‐
name:
age


‐
name:
email




direction:
asc
Invalid Queries

query
=
User.all()
query.filter("age
>=",
42)
query.filter("email
>=",
"abc")

query
=
User.all()
query.filter("age
>=",
42)
query.order("email")
sputter
User




Post          Follow
following
=
Follow.all().
filter("user
=",
current_user)

Post.all().filter("user
in",

following).order("‐created_at")
following
=
Follow.all().
filter("user
=",
current_user)

Post.all().filter("user
in",

following).order("‐created_at")
User



                TimelinePos
Post   Follow
                     t
TimelinePost.all().
filter("delivered_to",
current_user).
order("‐created_at")
Follow along at:
http://bitbucket.org/look/sputter
App Engine
Weaknesses
...but it is moving
                  fast
           ≈ 1 release/month

•   Backends                       •   Bulk import/export

•   Always on instances            •   High replication datastore

•   Blobstore                      •   MapReduce API

•   Image serving & thumbnailing   •   Browser-push "Channel" API

•   Remove fetch/count limits      •   Namespaces/Multitenancy


                                                     photo: Stig
                                                      Nygaard
On the road map

• SSL for your own domain
• Full-text search
• Python 2.7
• Hosted SQL
Introduction to Google App Engine

Más contenido relacionado

La actualidad más candente

DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'rmcleay
 
kumogata-template の紹介
kumogata-template の紹介kumogata-template の紹介
kumogata-template の紹介Naoya Nakazawa
 
Infrastructure as Code 삽질기
Infrastructure as Code 삽질기Infrastructure as Code 삽질기
Infrastructure as Code 삽질기Changwan Jun
 
Developing, Testing and Scaling with Apache Camel - UberConf 2015
Developing, Testing and Scaling with Apache Camel - UberConf 2015Developing, Testing and Scaling with Apache Camel - UberConf 2015
Developing, Testing and Scaling with Apache Camel - UberConf 2015Matt Raible
 
[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화NAVER D2
 
[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견NAVER D2
 
Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)Richard Donkin
 
Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)Tomer Gabel
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with AnsibleAhmed AbouZaid
 
Migrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to AzureMigrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to AzureRevolution Analytics
 
How Ansible Makes Automation Easy
How Ansible Makes Automation EasyHow Ansible Makes Automation Easy
How Ansible Makes Automation EasyPeter Sankauskas
 
Building a production ready meteor app
Building a production ready meteor appBuilding a production ready meteor app
Building a production ready meteor appRitik Malhotra
 
PyData London 2015 - How We Turned EverythingMe Into a Data Driven Company
PyData London 2015 - How We Turned EverythingMe Into a Data Driven CompanyPyData London 2015 - How We Turned EverythingMe Into a Data Driven Company
PyData London 2015 - How We Turned EverythingMe Into a Data Driven CompanyArik Fraimovich
 
Welcome to ClojureScript
Welcome to ClojureScriptWelcome to ClojureScript
Welcome to ClojureScriptIkuru Kanuma
 
Monitor-Driven Development Using Ansible
Monitor-Driven Development Using AnsibleMonitor-Driven Development Using Ansible
Monitor-Driven Development Using AnsibleItamar Hassin
 

La actualidad más candente (20)

DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
 
kumogata-template の紹介
kumogata-template の紹介kumogata-template の紹介
kumogata-template の紹介
 
Infrastructure as Code 삽질기
Infrastructure as Code 삽질기Infrastructure as Code 삽질기
Infrastructure as Code 삽질기
 
Developing, Testing and Scaling with Apache Camel - UberConf 2015
Developing, Testing and Scaling with Apache Camel - UberConf 2015Developing, Testing and Scaling with Apache Camel - UberConf 2015
Developing, Testing and Scaling with Apache Camel - UberConf 2015
 
[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화
 
[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견
 
re:dash is awesome
re:dash is awesomere:dash is awesome
re:dash is awesome
 
Cyansible
CyansibleCyansible
Cyansible
 
Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)
 
Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)Nashorn: JavaScript that doesn’t suck (ILJUG)
Nashorn: JavaScript that doesn’t suck (ILJUG)
 
Ansible Case Studies
Ansible Case StudiesAnsible Case Studies
Ansible Case Studies
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with Ansible
 
Migrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to AzureMigrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to Azure
 
How Ansible Makes Automation Easy
How Ansible Makes Automation EasyHow Ansible Makes Automation Easy
How Ansible Makes Automation Easy
 
Building a production ready meteor app
Building a production ready meteor appBuilding a production ready meteor app
Building a production ready meteor app
 
PyData London 2015 - How We Turned EverythingMe Into a Data Driven Company
PyData London 2015 - How We Turned EverythingMe Into a Data Driven CompanyPyData London 2015 - How We Turned EverythingMe Into a Data Driven Company
PyData London 2015 - How We Turned EverythingMe Into a Data Driven Company
 
R in Minecraft
R in Minecraft R in Minecraft
R in Minecraft
 
Amazed by aws 1st session
Amazed by aws 1st sessionAmazed by aws 1st session
Amazed by aws 1st session
 
Welcome to ClojureScript
Welcome to ClojureScriptWelcome to ClojureScript
Welcome to ClojureScript
 
Monitor-Driven Development Using Ansible
Monitor-Driven Development Using AnsibleMonitor-Driven Development Using Ansible
Monitor-Driven Development Using Ansible
 

Destacado

Social media trends
Social media trendsSocial media trends
Social media trendsVreni Bean
 
What's New in Windows Phone "Mango"
What's New in Windows Phone "Mango"What's New in Windows Phone "Mango"
What's New in Windows Phone "Mango"mdc11
 
Silverlight 5 whats new overview
Silverlight 5 whats new overviewSilverlight 5 whats new overview
Silverlight 5 whats new overviewmdc11
 
Conventions of a music video
Conventions of a music videoConventions of a music video
Conventions of a music videosrallison
 
Music Theory
Music TheoryMusic Theory
Music Theorysrallison
 
MVVM Light Toolkit Works Great, Less Complicated
MVVM Light ToolkitWorks Great, Less ComplicatedMVVM Light ToolkitWorks Great, Less Complicated
MVVM Light Toolkit Works Great, Less Complicatedmdc11
 

Destacado (7)

2014 entry electrical engineering
2014 entry electrical engineering2014 entry electrical engineering
2014 entry electrical engineering
 
Social media trends
Social media trendsSocial media trends
Social media trends
 
What's New in Windows Phone "Mango"
What's New in Windows Phone "Mango"What's New in Windows Phone "Mango"
What's New in Windows Phone "Mango"
 
Silverlight 5 whats new overview
Silverlight 5 whats new overviewSilverlight 5 whats new overview
Silverlight 5 whats new overview
 
Conventions of a music video
Conventions of a music videoConventions of a music video
Conventions of a music video
 
Music Theory
Music TheoryMusic Theory
Music Theory
 
MVVM Light Toolkit Works Great, Less Complicated
MVVM Light ToolkitWorks Great, Less ComplicatedMVVM Light ToolkitWorks Great, Less Complicated
MVVM Light Toolkit Works Great, Less Complicated
 

Similar a Introduction to Google App Engine

Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGuillaume Laforge
 
AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09Chris Purrington
 
App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munichdion
 
Cloud Computing Bootcamp On The Google App Engine [v1.1]
Cloud Computing Bootcamp On The Google App Engine [v1.1]Cloud Computing Bootcamp On The Google App Engine [v1.1]
Cloud Computing Bootcamp On The Google App Engine [v1.1]Matthew McCullough
 
1.6 米嘉 gobuildweb
1.6 米嘉 gobuildweb1.6 米嘉 gobuildweb
1.6 米嘉 gobuildwebLeo Zhou
 
Castles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App EngineCastles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App Enginecatherinewall
 
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
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Pierre Joye
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java3Pillar Global
 
Ruby on Google App Engine: Upgrade to Google App "Turbo" Engine
Ruby on Google App Engine: Upgrade to Google App "Turbo" EngineRuby on Google App Engine: Upgrade to Google App "Turbo" Engine
Ruby on Google App Engine: Upgrade to Google App "Turbo" EngineJoseph Ku
 
Scaling Django Apps using AWS Elastic Beanstalk
Scaling Django Apps using AWS Elastic BeanstalkScaling Django Apps using AWS Elastic Beanstalk
Scaling Django Apps using AWS Elastic BeanstalkLushen Wu
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang YoonJesang Yoon
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Google App Engine: An Introduction
Google App Engine: An IntroductionGoogle App Engine: An Introduction
Google App Engine: An IntroductionAbu Ashraf Masnun
 

Similar a Introduction to Google App Engine (20)

Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
DOTNET8.pptx
DOTNET8.pptxDOTNET8.pptx
DOTNET8.pptx
 
GAE_20100112
GAE_20100112GAE_20100112
GAE_20100112
 
AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09
 
App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munich
 
Cloud Computing Bootcamp On The Google App Engine [v1.1]
Cloud Computing Bootcamp On The Google App Engine [v1.1]Cloud Computing Bootcamp On The Google App Engine [v1.1]
Cloud Computing Bootcamp On The Google App Engine [v1.1]
 
1.6 米嘉 gobuildweb
1.6 米嘉 gobuildweb1.6 米嘉 gobuildweb
1.6 米嘉 gobuildweb
 
Castles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App EngineCastles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App Engine
 
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
 
OWF12/Java Moussine pouchkine Girard
OWF12/Java  Moussine pouchkine GirardOWF12/Java  Moussine pouchkine Girard
OWF12/Java Moussine pouchkine Girard
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java
 
Ruby on Google App Engine: Upgrade to Google App "Turbo" Engine
Ruby on Google App Engine: Upgrade to Google App "Turbo" EngineRuby on Google App Engine: Upgrade to Google App "Turbo" Engine
Ruby on Google App Engine: Upgrade to Google App "Turbo" Engine
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
Scaling Django Apps using AWS Elastic Beanstalk
Scaling Django Apps using AWS Elastic BeanstalkScaling Django Apps using AWS Elastic Beanstalk
Scaling Django Apps using AWS Elastic Beanstalk
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoon
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Google App Engine: An Introduction
Google App Engine: An IntroductionGoogle App Engine: An Introduction
Google App Engine: An Introduction
 

Último

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Último (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

Introduction to Google App Engine

Notas del editor

  1. About me: primarily think of myself as a Rails developer; brought into Best Buy to join a team looking at porting a Rails app to GAE; now have done GAE development for 1.5 years\n
  2. Why App Engine?\n\n \n \nThe promise of app engine is that if you write your application the App Engine way, you can outsource the management and scaling of your application to Google.\n
  3. In short, scaling is hard so...\n
  4. Let these guys do it for you.\n
  5. One problem with scaling is that you have to over provision in order to get acceptable user performance. \n
  6. Of course scaling&apos;s not so neat. Traffic goes up and down. You either end up scrambling to add capacity or over-provisioned. Probably both.\n
  7. Google App engine takes care of that for you. By running on Google&apos;s infrastructure and following their restrictions, App Engine can scale up and down automatically.\n
  8. Server: physical hard ware - most bang for the buck, but inflexible. Example: colo\nVirtual server: dedicated access to a fraction of a server&apos;s resources. Example: VMWare, AWS\nProcess: managed hosting environment. Example: Heroku\nRequest: Spin up and down resources on demand, automatically. Example: App Engine\n
  9. GAE went from an amazing deal to merely a good deal for free hosting. It is no comparable to Heroku in pricing.\n
  10. \n \n http://www.flickr.com/photos/kash_if/2539073569/\n \n \n
  11. EC2 is MUCH more flexible in what you can do -- you can run anything. &quot;Build your own cloud&quot;\n\n \n \nApp Engine is more expensive but provides a managed environment that means you do zero sysadmin.\n
  12. Heroku and App Engine are very similar.\n\n \n \nHeroku&apos;s main advantage (now that App Engine pricing has increased) is its support for 3rd party add ons, plus you can use EC2 APIs with less latency.\n
  13. Admin Console (development server)\nAdmin Console (production server)\nApp Stats (extreme visualization of requests)\nRemote API &amp; remote shell\n
  14. \n \n
  15. \n \n
  16. Datastore viewer\n
  17. And you can drill down and view/edit all the details of an existing entity.\n
  18. Permissions settings are really cool, and you can easily add more owners to the app.\n
  19. Versions! All run at the same time. Use for testing, data migrations, even deploy a Java or Go runtime to a different version and access the same datastore!\n
  20. \n \n
  21. Getting started with App Engine: step 1: download the SDK\n\n \n \nThe SDK is how you run your app locally. It comes with a launcher, or you can use use dev_appserver.py on the command line.\n\n \n \nIt is important to note: the SDK EMULATES App Engine production environment. The implementation of the APIs is different, and the server itself is single threaded. AND your computer is probably way faster than an App Engine instance, so some things that work locally just *won&apos;t* on App Engine.\n
  22. Once you&apos;ve got the SDK installed, it&apos;s time to dive in.\n
  23. Here I am outputting HTML directly for simplicities&apos; sake, but webapp can use Django templates (also built into App Engine).\n
  24. As you can see, webapp is pretty bare-bones. It doesn&apos;t do much for you.\n\n \n \nApp Engine also comes packaged with Django, but for the longest time the version supported was 0.98 or 1.1 (both super old). Adding your own was hard, and Django isn&apos;t optimized for App Engine anyway. It&apos;s slow, and a lot of what makes Django &quot;Django&quot; doesn&apos;t work on App Engine. You can&apos;t use the automatic admin or Django Models.\n
  25. So people keep coming up with frameworks optimized for App Engine.\n\n \n \nApp Engine Frameworks tend to die.\n\n \n \nI think the number of interested developers is just too low.\n
  26. So people keep coming up with frameworks optimized for App Engine.\n\n \n \nApp Engine Frameworks tend to die.\n\n \n \nI think the number of interested developers is just too low.\n
  27. So people keep coming up with frameworks optimized for App Engine.\n\n \n \nApp Engine Frameworks tend to die.\n\n \n \nI think the number of interested developers is just too low.\n
  28. So people keep coming up with frameworks optimized for App Engine.\n\n \n \nApp Engine Frameworks tend to die.\n\n \n \nI think the number of interested developers is just too low.\n
  29. So people keep coming up with frameworks optimized for App Engine.\n\n \n \nApp Engine Frameworks tend to die.\n\n \n \nI think the number of interested developers is just too low.\n
  30. So people keep coming up with frameworks optimized for App Engine.\n\n \n \nApp Engine Frameworks tend to die.\n\n \n \nI think the number of interested developers is just too low.\n
  31. webapp2 by the author of tipfy. Very simple, adds some nicities to WebApp, like routes\n
  32. So, we wrote Substrate.\n\n \n \nIt&apos;s not a framework. It just packages up some useful libraries (including some we&apos;ve written ourselves) and provides a base application to build off of.\n
  33. Google built the Datastore for App Engine on top of the famous BigTable. It is a distributed data store that supports querying and transactions in limited circumstances. It does not support joins, though it does have references. If you have used MongoDB, it sort of reminds me of that (though Mongo&apos;s querying is more powerful).\n\n \n \nIn my experience I would compare it most closely to MongoDB.\n\n \n http://www.flickr.com/photos/redjar/113152393/\n \n \n \n\n \n
  34. Code example: defining a model\nProblem: finding a good key \n- key is the only way to guarantee uniqueness\n\n \n \nExample of several of the property types\n
  35. Data modeling: Keys\nThe Key encodes the type of Entity and its unique ID or Name. Keys are universally unique in your application. IDs are assigned automatically, but you can assign names.\n\n \n \nYou can use a key to fetch an Entity. This is the fastest way to look up an entity\n
  36. Code Example: Transactions\n\n \n \nTransactions are a special case on App Engine. All entities in a transaction must be in the same &quot;Entity Group&quot;, which means they have the same root key. By default, each entity is in its own entity group.\n\n \n \nAs keys cannot be changed, once an entity is assigned to an entity group, this cannot be changed.\n
  37. Code Example: querying\n\n \n \nOf course, most of the time you can&apos;t look everything up by key. \n
  38. Querying with Custom indexes\n
  39. App Engine is limited in the kinds of queries it can do\n
  40. \n \n
  41. \n \n
  42. This is NOT a good idea, because IN query translates to n queries that are OR&apos;ed together.\n
  43. So, here&apos;s another idea: make an &quot;inbox&quot; of posts from the users a user follows when they get created. We can do this in the background after a status is posted. All the fields necessary to display a post will be cached in the TimelinePost, which means we don&apos;t have to fetch any other records to display it.\n
  44. \n \n
  45. \n \n
  46. &amp;#x201C;Cold start&amp;#x201D; time - especially for Java, especially for bulky frameworks or JVM langs\nNo SSL for your own domain\n&amp;#x201C;Naked&amp;#x201D; domains don&amp;#x2019;t work\nPython 2.5 (2006!!!) --- Python 2.7 coming soon\nNo full-text search (wtf, Google)\nVendor lock-in\n
  47. \n \n http://www.flickr.com/photos/stignygaard/2228400937/\n \n \n
  48. \n \n http://www.flickr.com/photos/ocarchives/3401996925/\n \n \n \n\n \n \nI would joke about Duke Nukem, but that already came out.\n
  49. Despite the pricing controversy, I think the future for App Engine is bright. Leaving &quot;preview&quot; status and becoming self-sustaining for Google. Google will continue to devote resources to improving GAE. Every month a new release comes out with more features and increases the amount you can do with it.\n\n \n \nIt is awesome for apps that stay inside its sweet spot: read-heavy apps that respond quickly. Not so great for heavy number crunching. EC2 is a better choice there; GAE is optimized for serving HTTP and probably always will be.\n\n \n \n\n \n \nConclusion - for hobby projects GAE is still a great option. Most projects can stay under the 28 hour/day limit, but if your app gets popular, you can smoothly scale up to hundreds of thousands of hits per day for a reasonable price.\n