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
21. 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
22. Memcache
Distributed, very fast,
in-memory cache
Optimistic caching
Very stable, robust and specialized
Google Confidential and Proprietary
23. URL Fetch
Simple, HTTP communication
HTTP GET/POST to external service
Allows integration with third-party REST APIs
Google Confidential and Proprietary
24. Mail
Inbound and outbound mail
Outbound mail
Inbound mail handling
Attachment processing
Google Confidential and Proprietary
25. XMPP
Instant messaging for your application
Incoming and outgoing XMPP
No need to worry about setting up servers
Google Confidential and Proprietary
26. Task Queue
Background and scheduled
computation
Background processing infrastructure
Scheduled jobs
Automatic handling of queuing and job polling
Google Confidential and Proprietary
27. Images
Image manipulation
Resize
Crop
Image compositions
Google Confidential and Proprietary
28. Blobstore
Heavy lifting for large files
Upload and distribute large files
Programmatic access to file contents
Google Confidential and Proprietary
29. User Accounts
Federated login for your application
Google Accounts or OpenID
Administrator management
No need to create user management system
Google Confidential and Proprietary
31. 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!
32. 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):
33. Project contents
app.yaml – main configuration file
index.yaml – automatically
generated to index your data
main.py – your main application
"controller" code goes here