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. “Run your web apps on Google's infrastructure.
Easy to build, easy to maintain, easy to scale.”
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.
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
8. “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
23. 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
24. Sample of Data Model “Kind”
class FoursquareUser(db.Model):
created = db.DateTimeProperty(auto_now_add=True)
name = db.TextProperty()
email = db.TextProperty()
25. 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”])
26. Other services
Google Accounts
Mail
URL Fetch
Memcache
Image manipulation
Queues
Cron jobs
- 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.
- 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"