0
Google App Engine
An Intro, by Lenny Rachitsky
Questions
Agenda
1. Where App Engine fits
2. What is App Engine
3. How to use App Engine
4. How I’ve used App Engine
5. Q&A
“Run your web apps on Google's infrastructure.
  Easy to build, easy to maintain, easy to scale.”
What is “The Cloud”?

“Cloud computing is a model for enabling convenient, on-
demand network access to a shared pool of c...
“The Cloud”
Don’t have to build your own infrastructure
Pay only for what you use
Use as much as you need, whenever you
ne...
“The Cloud”
Don’t have to build your own infrastructure
Pay only for what you use
Use as much as you need, whenever you
ne...
Cloud Service Models
Cloud Service Models




              IaaS
     (Infrastructure-as-a-Service)
Cloud Service Models



              PaaS
       (Platform-as-a-Service)



              IaaS
     (Infrastructure-as-a-...
Cloud Service Models

              SaaS
       (Software-as-a-Service)



              PaaS
       (Platform-as-a-Servic...
Cloud Service Models

              SaaS
       (Software-as-a-Service)



              PaaS
       (Platform-as-a-Servic...
Cloud Service Models



            PaaS
      (Platform-as-a-Service)
Overview of Google App Engine
The Pitch:
You write the code, someone else worries
about everything else
The Sandbox
The Sandbox

Python or Java
The Sandbox

Python or Java
Limited access
The Sandbox

Python or Java
Limited access
Limited run time
The Sandbox

Python or Java
Limited access
Limited run time
Datastore
The Datastore

Based on “BigTable”
Schemaless
NoSQL, with SQL type queries
Scales infinitely
Means a lot less time spent on...
Sample of Data Model “Kind”


class FoursquareUser(db.Model):
   created = db.DateTimeProperty(auto_now_add=True)
   name ...
Sample query


query = db.GqlQuery("SELECT * FROM FoursquareUser")

for user in query:
     self.response.out.write("User ...
Other services
 Google Accounts
 Mail
 URL Fetch
 Memcache
 Image manipulation
 Queues
 Cron jobs
Costs
Quota’s
Target Application
Let’s create an app!
Demo my apps
Google I/O
Resources

http://code.google.com/appengine/docs/python/
gettingstarted/
http://code.google.com/appengine/docs/python/
ove...
Q&A
Google App Engine - Simple Introduction
Google App Engine - Simple Introduction
Upcoming SlideShare
Loading in...5
×

Google App Engine - Simple Introduction

2,198

Published on

A very basic overview of Google App Engine

Published in: Technology
1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total Views
2,198
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
142
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

  • - Who here has heard of App Engine before this talk came up on the agenda?
    - Who here has used App Engine?
    - Who has something running on App Engine today?
    - Throw out things you’d like to get out of this talk today.

  • - The basic pitch
    - Sounds nice
    - How does it work?
    - Let’s step back and talk about the cloud in general
  • blah blah blah
  • - Basically lets you use computing resources like electricity
  • - The promise of the cloud, and we’re pretty much there, means...
  • instead of rack and stack, you click and drag
  • - A lot of different companies are offering cloud computing platforms.
    - What are the differences?
  • - The pundits have grouped the various cloud offerings into three service models
  • - Basically virtualized hardware somewhere out in the providers datacenter, where you are still dealing with servers, except you don’t have to actually deal with the hardware or support or management, and you can launch/kill servers at will
  • - Paas, where you don’t have to worry about servers or scaling, in exchange for being limited in what you can do in you code
  • - and our world of saas, which are basically web applications fully built that you don’t have to install locally
  • This is where each of the providers fit today...

  • And what we’re talking about today is Platform as a service. Google App Engine is the furthest along, but vmforce just launched and will probably be a strong offering. There are a few other popular paas services, such as Horuku and EngineYard that are Ruby on Rails based.

  • - Everything else = hardware, OS, scaling, databases, storage, parallelization, load balancing, queueing, account management, billing, etc.
  • - When you write you applications, you write them inside a sandbox environment
    - Means you are a bit limited in what you can theoretically do
  • - Can only use Python or Java, though you can run other languages that run on the JVM such as ruby, scala, and even javascript
    -- You can use the most common frameworks such as Django and Spring
  • - Limited access to underlying operating system
    -- can’t write to disk
    -- No sockets to connect to other machines.
    - Allows app engine to distribute your requests across multiple servers, and launch/kill servers as needed.
  • - Each process can take no longer than 30 seconds to run, at which point it is killed
    - Other limitations:
    -- can’t use SSL from a custom domain, database fields can’t get bigger then 1MB unless you’re using a new blob column
  • - basically forced to use google’s own datastore for your database
  • actually one of the bigger advantages of using app engine is the datastore
  • - equivalent of a sql style table
    - You create a class with each property getting mapped to the datastore automatically
  • Then you do a simple query very similar to how you would do it in SQL, and get back basically a hash for each table row.


  • - Costs are based on quota’s
    - There’s a quota on basically every piece of the architecture
  • - CPU time, bandwidth, storage, api calls, mail sent, url’s fetched, etc.
    - You get an amazingly generous amount free
    - They claim it can support 5 million page views a month at the free quota, if you use the platform the right way
  • - Based on the quota’s, and the sandbox, the app engine platform is tuned for “web applications”. Things like 30 second limits on processes, and inability to control your location, and pain in getting mass amounts of data in/out keep it from being great for other things. In exchange it’s really good for web apps.
    - Not: data mining, running a monitoring system, running exchange, managing other clouds
    - But that’s just today. Who knows where things will go?
  • enough theory, let’s create an app that queries the twitter search API and returns any tweet that matches a given search term

  • - Can use Speed Tracer with Google App Engine page stats
    - Can launch Spring powered apps to Google App Engine?
    - half a billion page views per day
    - They claim 60% of it costs are for keeping the lights on
    - Announced app engine for businesss
    -- Customers said they needed better reliability, support, key features, predictable pricing
    -- Domain console to help manage all app engine apps, with permissions/policies per employee
    -- professional support (soon)
    -- SLA's (soon)
    --- real sql, full sql, scales just as much as sql server would on its own
    -- SSL and SQL server (later)
    -- $8/user per month, up to $1000/month
    - Performance stats
    -- put is 50-100ms
    -- get is 10-20 ms
    -- index on put
    -- memcache is 5-10ms
    -- most time is spent in RPC calls waiting for traffic
    - audience complaints
    -- lack of focus on java and core issues, they think the team is being distracted focusing on the enterprise
    -- they want to know whether they should bet on amazon or google
    -- Google guy: "We're trying to take over the world"
    - lessons learned from lauching app engine
    -- keep everything configurable, you don't know how people will use your service, have knobs and dials
    -- "TRansparency is key, really important for developers to know whats happening"


  • Transcript of "Google App Engine - Simple Introduction"

    1. 1. Google App Engine An Intro, by Lenny Rachitsky
    2. 2. Questions
    3. 3. Agenda 1. Where App Engine fits 2. What is App Engine 3. How to use App Engine 4. How I’ve used App Engine 5. Q&A
    4. 4. “Run your web apps on Google's infrastructure. Easy to build, easy to maintain, easy to scale.”
    5. 5. What is “The Cloud”? “Cloud computing is a model for enabling convenient, on- demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.” -- National Institute of Standards and Technology
    6. 6. “The Cloud” Don’t have to build your own infrastructure Pay only for what you use Use as much as you need, whenever you need
    7. 7. “The Cloud” Don’t have to build your own infrastructure Pay only for what you use Use as much as you need, whenever you need Manage your infrastructure with code
    8. 8. Cloud Service Models
    9. 9. Cloud Service Models IaaS (Infrastructure-as-a-Service)
    10. 10. Cloud Service Models PaaS (Platform-as-a-Service) IaaS (Infrastructure-as-a-Service)
    11. 11. Cloud Service Models SaaS (Software-as-a-Service) PaaS (Platform-as-a-Service) IaaS (Infrastructure-as-a-Service)
    12. 12. Cloud Service Models SaaS (Software-as-a-Service) PaaS (Platform-as-a-Service) IaaS (Infrastructure-as-a-Service)
    13. 13. Cloud Service Models PaaS (Platform-as-a-Service)
    14. 14. Overview of Google App Engine
    15. 15. The Pitch: You write the code, someone else worries about everything else
    16. 16. The Sandbox
    17. 17. The Sandbox Python or Java
    18. 18. The Sandbox Python or Java Limited access
    19. 19. The Sandbox Python or Java Limited access Limited run time
    20. 20. The Sandbox Python or Java Limited access Limited run time Datastore
    21. 21. The Datastore Based on “BigTable” Schemaless NoSQL, with SQL type queries Scales infinitely Means a lot less time spent on the database Maybe the best part of App Engine
    22. 22. Sample of Data Model “Kind” class FoursquareUser(db.Model): created = db.DateTimeProperty(auto_now_add=True) name = db.TextProperty() email = db.TextProperty()
    23. 23. Sample query query = db.GqlQuery("SELECT * FROM FoursquareUser") for user in query: self.response.out.write("User name: %s" % user[“name”]) self.response.out.write("User email: %s" % user[“email”])
    24. 24. Other services Google Accounts Mail URL Fetch Memcache Image manipulation Queues Cron jobs
    25. 25. Costs
    26. 26. Quota’s
    27. 27. Target Application
    28. 28. Let’s create an app!
    29. 29. Demo my apps
    30. 30. Google I/O
    31. 31. Resources http://code.google.com/appengine/docs/python/ gettingstarted/ http://code.google.com/appengine/docs/python/ overview.html http://appengine-cookbook.appspot.com/ http://googleappengine.blogspot.com/2010/03/easy- performance-profiling-with.html
    32. 32. Q&A
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×