Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
-
Upload
pamela-fox -
Category
Technology
-
view
1.932 -
download
2
description
Transcript of Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
![Page 1: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/1.jpg)
Living In The CloudHosting Data & Apps Using The Google Infrastructure
![Page 2: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/2.jpg)
Introductions
Pamela Fox USC/Google
http://www.wordle.net/gallery/wrdl/710650/fkedupmonkey_tags
![Page 3: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/3.jpg)
The Cloud!
![Page 4: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/4.jpg)
Tonight’s Agenda
Google Data APIs App Engine
![Page 5: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/5.jpg)
Before the Cloud: Web Apps
![Page 6: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/6.jpg)
After the Cloud: Web Apps
![Page 7: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/7.jpg)
Viral Spread + User Edits = Scaling Nightmare
Mo’ Users, Mo’ Problems
![Page 8: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/8.jpg)
Old Architecture
code/data
![Page 9: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/9.jpg)
Old Architecture
![Page 10: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/10.jpg)
Old Architecture
![Page 11: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/11.jpg)
Old Architecture
![Page 12: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/12.jpg)
Solution: App Engine
![Page 13: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/13.jpg)
What Is App Engine?
Lets you run your web application on top of Google’s infrastructure.
• Servers• Network• Datastore• Backups• Pagers
Scalable}“We wear pagers so you don’t have to.”
— Guido van Rossum
![Page 14: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/14.jpg)
App Engine Architecture
code data
![Page 15: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/15.jpg)
Simple, Automatic Scaling
![Page 16: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/16.jpg)
App Engine Components
code data
![Page 17: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/17.jpg)
Python
![Page 18: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/18.jpg)
Data Store
![Page 19: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/19.jpg)
Data Store
db.GqlQuery("SELECT * FROM Shout " "WHERE who >= 'b' AND who < ' c ' " "ORDER BY when DESC").fetch(100)
query = Shout.all()query.order('-date')query.filter('who >=', 'b')query.filter('who <', ‘c')shouts = query.fetch(100)
![Page 20: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/20.jpg)
Memcache
![Page 21: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/21.jpg)
Users
@gmail.com
@myappsdomain.com
![Page 22: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/22.jpg)
Demo
Google App Engine
![Page 23: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/23.jpg)
Before the Cloud: User Apps
![Page 24: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/24.jpg)
After the Cloud: User Apps
![Page 25: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/25.jpg)
• Users demand ownership of their content.
• Other sites want to access that content.
Damn Needy Users
![Page 26: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/26.jpg)
Solution: Google data APIs
![Page 27: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/27.jpg)
How Do You Make Things Accessible?
Application
Programming
Interface( )An application programming interface (API) is a set of functions, procedures, methods or classes that an operating system, library or service provides to support requests made by computer programs.
Source: Wikipedia
![Page 28: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/28.jpg)
APIs
RPC || REST
* SOAP
![Page 29: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/29.jpg)
Remote Procedure Calls
fooInstance->addNumbers(2, 3);
<?xml version="1.0"?><methodCall> <methodName>Foo.addNumbers</methodName> <params> <param> <value><int>2</int></value> <value><int>3</int></value> </param> </params></methodCall>
fooInstance.addNumbers(2, 3);
PHP
XML(Network)
C++
![Page 30: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/30.jpg)
REST
Representational
State
Transfer( )[Fielding 2000]
![Page 31: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/31.jpg)
REST
Fundamentals of REST:
Application state and functionality is abstracted into discrete resources.
![Page 32: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/32.jpg)
REST
Fundamentals of REST:
Resources are accessible via URLs.
/blog/posts/1234
![Page 33: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/33.jpg)
REST
Fundamentals of REST:
Resources share a uniform interface for transferring state.
HTTP://
GET POST
PUT DELETE
}
![Page 34: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/34.jpg)
RSS/ATOM
Feed
{Entries
Example RSS feed.
![Page 35: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/35.jpg)
ATOMPub
Feed
{Entries
GET POST
PUT DELETE
![Page 36: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/36.jpg)
Google data APIs Protocol
Feed
Query
{Entries
GET POST
PUT DELETE
![Page 37: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/37.jpg)
The Google Data Protocol
REST
Google Data Protocol
RSS 2.0
Architecture
Syndication
UpdatesAtomPub
Atom
![Page 38: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/38.jpg)
The Google Data Protocol
RSS 2.0 Atom(Pub)
Google Data
Syndication Format ✓ ✓ ✓
Queries ✓
Updates ✓ ✓
Optimistic Concurrency ✓
Authentication ✓
![Page 39: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/39.jpg)
The Google Data Protocol
Over 15 APIs, 1 Protocol
Many Uses
![Page 40: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/40.jpg)
Case Study: CalGoo
![Page 41: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/41.jpg)
The Google Data Protocol
GET /myFeed
200 OK
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Foo</title>
<updated>2006-01-23T16:25:00-08:00</updated>
<id>http://www.example.com/myFeed</id>
<author>
<name>Jo March</name>
</author>
<link href="/myFeed" rel="self"/>
</feed>
Requesting a feed or resource
![Page 42: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/42.jpg)
The Google Data Protocol
POST /myFeed
<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<author>
<name>Elizabeth Bennet</name>
<email>[email protected]</email>
</author>
<title type="text">Entry 1</title>
<content type="text">This is my entry</content>
</entry>
Creating a new resource
![Page 43: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/43.jpg)
The Google Data Protocol
201 CREATED
<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<id>http://www.example.com/id/1</id>
<link rel="edit" href="http://example.com/myFeed/1/1/"/>
<updated>2006-01-23T16:26:03-08:00</updated>
<author>
<name>Elizabeth Bennet</name>
<email>[email protected]</email>
</author>
<title type="text">Entry 1</title>
<content type="text">This is my entry</content>
</entry>
Creating a new resource
![Page 44: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/44.jpg)
The Google Data Protocol
PUT /myFeed/1/1/
<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<id>http://www.example.com/id/1</id>
<link rel="edit" href="http://example.com/myFeed/1/1/"/>
<updated>2006-01-23T16:28:05-08:00</updated>
<author>
<name>Elizabeth Bennet</name>
<email>[email protected]</email>
</author>
<title type="text">Entry 1</title>
<content type="text">This is my first entry.</content>
</entry>
Updating an entry
![Page 45: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/45.jpg)
The Google Data Protocol
200 OK
<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<id>http://www.example.com/id/1</id>
<link rel="edit" href="http://example.com/myFeed/1/2/"/>
<updated>2006-01-23T16:28:05-08:00</updated>
<author>
<name>Elizabeth Bennet</name>
<email>[email protected]</email>
</author>
<title type="text">Entry 1</title>
<content type="text">This is my first entry.</content>
</entry>
Updating an entry
![Page 46: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/46.jpg)
The Google Data Protocol
DELETE /myFeed/1/2/
200 OK
Updating an entry
![Page 47: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/47.jpg)
Demo
Google Data CRUD
![Page 48: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/48.jpg)
The Google Data Protocol
GET /myFeed?q=This
200 OK
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Foo</title>
<updated>2006-01-23T16:26:03-08:00</updated>
<id>http://www.example.com/myFeed</id>
<link href="/myFeed" rel="self"/>
<entry>
<id>http://www.example.com/id/1</id>
<link rel="edit" href="http://example.com/myFeed/1/1/"/>
<updated>2006-01-23T16:26:03-08:00</updated>
<title type="text">Entry 1</title>
<content type="text">This is my entry</content>
</entry>
</feed>
Searching for a resource
![Page 49: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/49.jpg)
Demo
Youtube Searcher
![Page 50: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/50.jpg)
JSON and RSS
Other formats are also supported:
?alt=json
?alt=json-in-script
?alt=kml
?alt=rss
![Page 51: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/51.jpg)
Client Libraries
PHP
.NET
Java
JavaScriptObjective-C
Python
+ Community Contributed
![Page 52: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/52.jpg)
DemoGoogle Data Sample Applications
![Page 53: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/53.jpg)
My Secret Motivation For Giving This Talk
Google Data APIs
♥App Engine
![Page 54: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/54.jpg)
DemoGoogle Data APIs + App Engine
![Page 55: Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure](https://reader033.fdocuments.net/reader033/viewer/2022060106/5549246fb4c905a54c8b9c1f/html5/thumbnails/55.jpg)
Conclusion
Google Data APIs App Engine
Scalable Architecture(AtomPub) APIs