Developer DayGoogle 2010
The New Social Web:
It’s about Open Standards
Timothy Jordan
Developer DayGoogle 2010
Developer DayGoogle 2010
Timothy Jordan
Developer Advocate, Google
buzz.timothyjordan.com
@timothyjordan
Hello
Developer DayGoogle 2010
#gdd2010jp
Developer DayGoogle 2010
Agenda
• Open Standards
• Google Buzz
• Examples
Open Standards
...are a really good thing
Developer DayGoogle 2010
Why?
Developer DayGoogle 2010
Open Source
Developer DayGoogle 2010
Open Source
Developer DayGoogle 2010
Open Source
Developer DayGoogle 2010
Open Source
Developer DayGoogle 2010
Open Source
• Freedom
Developer DayGoogle 2010
Open Source
• Freedom
• Community
Developer DayGoogle 2010
Open Standards
Developer DayGoogle 2010
Open Standards
• Simplify
Developer DayGoogle 2010
Open Standards
• Simplify
• Interoperability
Developer DayGoogle 2010
Developer DayGoogle 2010
OAuth
1.Your application gets an unauthorized request token
from the Service Provider’s authoriza...
Developer DayGoogle 2010
OAuth
Your
Application
Service
Provider
Send user to SP
with token
2.Your application sends the u...
Developer DayGoogle 2010
OAuth
Your
Application
Service
ProviderGet authorized
request token
3.Your application gets an au...
Developer DayGoogle 2010
OAuth
Your
Application
Service
ProviderExchange request
for access token
4.You exchange the autho...
Developer DayGoogle 2010
OAuth
Your
Application
Service
ProviderUse access token
to get data
5.You use the access token to...
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Atom
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href=...
Developer DayGoogle 2010
Atom
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>tag:bl...
Developer DayGoogle 2010
Atom
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>tag:bl...
Developer DayGoogle 2010
Atom
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>tag:bl...
Developer DayGoogle 2010
Developer DayGoogle 2010
code.google.com/p/pubsubhubbub
Developer DayGoogle 2010
PubSubHubbub
Publisher SubscriberHub
Developer DayGoogle 2010
PubSubHubbub
1.Subscriber gets Publisher’s feed. The feed contains
a link to the Hub.
Publisher S...
Developer DayGoogle 2010
PubSubHubbub
1.Subscriber gets Publisher’s feed. The feed contains
a link to the Hub.
Publisher S...
Developer DayGoogle 2010
PubSubHubbub
2.Subscriber POSTs subscription request to the Hub.
The request contains the URL whe...
Developer DayGoogle 2010
PubSubHubbub
3.Hub hits the URL to verify the request was
authentic; Subscriber responds with con...
Developer DayGoogle 2010
PubSubHubbub
3.Hub hits the URL to verify the request was
authentic; Subscriber responds with con...
Developer DayGoogle 2010
PubSubHubbub
4.a) Publisher notifies Hub about updates by
POSTing feed URLs to the Hub; Hub pulls...
Developer DayGoogle 2010
PubSubHubbub
Give me
your latest
content for feed
X, please.
Publisher SubscriberHub
4.a) Publish...
Developer DayGoogle 2010
PubSubHubbub
Here you go.
Publisher SubscriberHub
4.a) Publisher notifies Hub about updates by
PO...
Developer DayGoogle 2010
PubSubHubbub
4.b) If the Publisher does not inform the Hub, the Hub
will periodically poll the Pu...
Developer DayGoogle 2010
PubSubHubbub
Here you go.
Publisher SubscriberHub
4.b) If the Publisher does not inform the Hub, ...
Developer DayGoogle 2010
PubSubHubbub
New update
to feed X! Here
you go.
Publisher SubscriberHub
5.When Hub receives new u...
Developer DayGoogle 2010
PubSubHubbub
New update
to feed X! Here
you go.
Publisher SubscriberHub
6.If feed X has multiple ...
Developer DayGoogle 2010
PubSubHubbub
Developer DayGoogle 2010
code.google.com/p/pubsubhubbub
Developer DayGoogle 2010
salmon-protocol.org
Developer DayGoogle 2010
Salmon
Source Aggregator
PubSubHubbub
I have a new
entry
1.New entry is posted on Source, pushed ...
Developer DayGoogle 2010
Salmon
Source Aggregator
A new entry? I
will re-publish it
right away.
1.New entry is posted on S...
Developer DayGoogle 2010
Salmon
Source Aggregator
Salmon
I have a new
comment on that
entry from you!
2.New comment is pos...
Developer DayGoogle 2010
Salmon
Source Aggregator
2.New comment is posted on the Aggregator. It
pushes the comment back up...
Developer DayGoogle 2010
Salmon
Source
Aggregator
3.The Source pushes the comment to all subscribers.
PubSubHubbub
Aggrega...
Developer DayGoogle 2010
Salmon
Source
Aggregator
3.The Source pushes the comment to all subscribers.
PubSubHubbub
Aggrega...
Developer DayGoogle 2010
Salmon
Source
3.The Source pushes the comment to all subscribers.
Aggregator
Salmon
I have a new
...
Developer DayGoogle 2010
Salmon
Source
3.The Source pushes the comment to all subscribers.
Aggregator
Salmon
A new comment...
Developer DayGoogle 2010
Salmon
Source
Aggregator
3.The Source pushes the comment to all subscribers.
PubSubHubbub
Aggrega...
Developer DayGoogle 2010
salmon-protocol.org
Developer DayGoogle 2010
activitystrea.ms
Developer DayGoogle 2010
Activity Streams
Actor
Developer DayGoogle 2010
Actor
Verb
Activity Streams
Developer DayGoogle 2010
Actor
Verb
Object
Activity Streams
Developer DayGoogle 2010
Timothy
Posts
A Note
Activity Streams
Developer DayGoogle 2010
Barack Obama
Started Following
Timothy Jordan
Activity Streams
Developer DayGoogle 2010
Timothy Jordan
Started Following
Barack Obama
Activity Streams
Developer DayGoogle 2010
Timothy Jordan
Has Tea With
Bella Swan
Activity Streams
Developer DayGoogle 2010
Timothy Jordan
Has Tea With
Bella Swan
Activity Streams
Developer DayGoogle 2010
activitystrea.ms
Developer DayGoogle 2010
Developer DayGoogle 2010
Google Buzz API
Developer DayGoogle 2010
Warning!
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Activity Streams
Developer DayGoogle 2010
Actor
Verb
Object
Developer DayGoogle 2010
Timothy
Posts
A Note
Developer DayGoogle 2010
     "href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:googl...
Developer DayGoogle 2010
    }
   ],
   "replies": [
    {
     "href": "{url}/{userId}/@self/{commentId}/@comments?alt=js...
Developer DayGoogle 2010
     "type": "json"
    }
   ],
   "replies": [
    {
     "href": "{url}/{userId}/@self/{comment...
Developer DayGoogle 2010
{
  "kind": "buzz#activity",
  "title": "note to self",
  "published": "2010-05-09T02:53:13.000Z"...
Developer DayGoogle 2010
{
  "kind": "buzz#activity",
  "title": "note to self",
  "published": "2010-05-09T02:53:13.000Z"...
Developer DayGoogle 2010
   ],
   "alternate": [
    {
     "href": "http://www.google.com/buzz/a/google.com",
     "type"...
Developer DayGoogle 2010
   "profileUrl": "{url}/chabotc",
   "thumbnailUrl": "{url}/chabotc/thumb.jpg"
  },
  "verbs": [
...
Developer DayGoogle 2010
   "profileUrl": "{url}/chabotc",
   "thumbnailUrl": "{url}/chabotc/thumb.jpg"
  },
  "verbs": [
...
Developer DayGoogle 2010
   "content": "content goes here",
   "links": {
    "alternate": [
     {
      "href": "http://...
Developer DayGoogle 2010
Developer DayGoogle 2010
    "object": {
     "type": "note",
     "content": "content goes here",
"attachments": [
{
"typ...
Developer DayGoogle 2010
Developer DayGoogle 2010
    "object": {
     "type": "note",
     "content": "content goes here",
     "attachments": [
 ...
Developer DayGoogle 2010
    "object": {
     "type": "note",
     "content": "content goes here",
"attachments": [
{
"typ...
Developer DayGoogle 2010
Favorite
Follow
Friend
Join
Play
Post
Save
Share
Tag
Update
Article
Audio
Bookmark
Comment
File
F...
Developer DayGoogle 2010
Favorite
Follow
Friend
Join
Play
Post
Save
Share
Tag
Update
Article
Audio
Bookmark
Comment
File
F...
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Activity Streams
Developer DayGoogle 2010
https://www.google.com/buzz/api/auth/OAuthAuthorizeToken
?scope=https%3A%2F%2Fwww.googleapis.com%...
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
PubSubHubbub
Developer DayGoogle 2010
Photo credit: Nandhp, used under the Creative Commons Attribution-Share Alike 3.0 Unported license.
Developer DayGoogle 20...
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Examples
Developer DayGoogle 2010
buzz-bingo.appspot.com
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Sign-In & Auth for Buzz
client = buzz.Client()
client.build_oauth_consumer(
  OAUTH_CONSUMER_KEY,...
Developer DayGoogle 2010
Sign-In & Auth for Buzz
request_token = 
  client.fetch_oauth_request_token(
    'http://example....
Developer DayGoogle 2010
# User visits the authorization_url
Sign-In & Auth for Buzz
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Sign-In & Auth for Buzz
verifier = request.get('oauth_verifier')
# Lookup request_token in data s...
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Board Marked
if post.attachments:
  for attachment in post.attachments:
    if attachment.type ==...
Developer DayGoogle 2010
Board Marked
# Create the attachments for the post
badge_attachment = buzz.Attachment(
  type='ph...
Developer DayGoogle 2010
Board Marked
# Assemble our announcement Buzz post
badge_post = buzz.Post(
  content=post_content...
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Developer DayGoogle 2010
Bingo!
if (5 in horizontal_counts) or 
    (5 in vertical_counts):
  self.award_badge('bingo')
Developer DayGoogle 2010
Developer DayGoogle 2010
Buzz Bingo is open source!
code.google.com/p/buzz-bingo
buzz-bingo.appspot.com
Developer DayGoogle 2010
Track
Extras
Developer DayGoogle 2010
Timothy Jordan
Developer Advocate, Google
buzz.timothyjordan.com
@timothyjordan
#gdd2010jp
Office...
Developer DayGoogle 2010
Links
https://code.google.com/apis/buzz/docs/
http://code.google.com/p/oacurl/
http://code.google...
Upcoming SlideShare
Loading in …5
×

Google Developer Day 2010 Japan: 新 SocialWeb: 全てはオープンスタンダードの元に (ティモシー ジョーダン)

1,828 views

Published on

SocialWeb の世界では情報のやりとりにますますオープンスタンダードを活用し始めています。これにより、さらに多くのサービスが連携を深め、ディベロッパーの関わる世界をシンプルにします。このセッションでは Activity Streams、OAuth、PubsubHubbub といった最も重要なオープンスタンダードを紹介すると共に、Google Buzz API に視点を移すことで、どのような実装や利用方法があるかを紹介します。また、既存のアプリケーションやサンプル、スタータープロジェクト、Q&A を通してさらに理解を深めます。

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,828
On SlideShare
0
From Embeds
0
Number of Embeds
808
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Google Developer Day 2010 Japan: 新 SocialWeb: 全てはオープンスタンダードの元に (ティモシー ジョーダン)

  1. 1. Developer DayGoogle 2010
  2. 2. The New Social Web: It’s about Open Standards Timothy Jordan Developer DayGoogle 2010
  3. 3. Developer DayGoogle 2010 Timothy Jordan Developer Advocate, Google buzz.timothyjordan.com @timothyjordan Hello
  4. 4. Developer DayGoogle 2010 #gdd2010jp
  5. 5. Developer DayGoogle 2010 Agenda • Open Standards • Google Buzz • Examples
  6. 6. Open Standards ...are a really good thing
  7. 7. Developer DayGoogle 2010 Why?
  8. 8. Developer DayGoogle 2010 Open Source
  9. 9. Developer DayGoogle 2010 Open Source
  10. 10. Developer DayGoogle 2010 Open Source
  11. 11. Developer DayGoogle 2010 Open Source
  12. 12. Developer DayGoogle 2010 Open Source • Freedom
  13. 13. Developer DayGoogle 2010 Open Source • Freedom • Community
  14. 14. Developer DayGoogle 2010 Open Standards
  15. 15. Developer DayGoogle 2010 Open Standards • Simplify
  16. 16. Developer DayGoogle 2010 Open Standards • Simplify • Interoperability
  17. 17. Developer DayGoogle 2010
  18. 18. Developer DayGoogle 2010 OAuth 1.Your application gets an unauthorized request token from the Service Provider’s authorization server. Your Application Service ProviderGet unauthorized request token
  19. 19. Developer DayGoogle 2010 OAuth Your Application Service Provider Send user to SP with token 2.Your application sends the user to the Service Provider, which asks the user to grant your application access to the required data.
  20. 20. Developer DayGoogle 2010 OAuth Your Application Service ProviderGet authorized request token 3.Your application gets an authorized request token from the authorization server.
  21. 21. Developer DayGoogle 2010 OAuth Your Application Service ProviderExchange request for access token 4.You exchange the authorized request token for an access token.
  22. 22. Developer DayGoogle 2010 OAuth Your Application Service ProviderUse access token to get data 5.You use the access token to request data from Service Provider’s service access servers.
  23. 23. Developer DayGoogle 2010
  24. 24. Developer DayGoogle 2010
  25. 25. Developer DayGoogle 2010 Atom <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?> <?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemconten <feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" feedburner/ext/1.0" gd:etag="W/&quot;CkUGRHk8fyp7ImA9Wx5WEU0.&quot;"> <id>tag:blogger.com,1999:blog-3188762512334365442</id> <updated>2010-09-21T13:17:05.777-07:00</updated> <title>Social Web Blog</title> <subtitle type="html" /> <link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://googlesoc <link rel="alternate" type="text/html" href="http://googlesocialweb.blogspot.com/" /> <link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/31887625123343654 <author> <name>A Googler</name> <email>noreply@blogger.com</email> </author> <generator version="7.00" uri="http://www.blogger.com">Blogger</generator> <openSearch:totalResults>45</openSearch:totalResults> <openSearch:startIndex>1</openSearch:startIndex> <openSearch:itemsPerPage>25</openSearch:itemsPerPage> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" hr <feedburner:info uri="socialwebblog" /> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.app <entry gd:etag="W/&quot;D0YASX89cCp7ImA9WxFaFUo.&quot;"> <id>tag:blogger.com,1999:blog-3188762512334365442.post-8190772326434476744</id> <published>2010-07-19T14:14:00.001-07:00</published>
  26. 26. Developer DayGoogle 2010 Atom <?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <id>tag:blogger.com,1999:blog-3188762512334365442</id> <updated>2010-09-21T13:17:05.777-07:00</updated> <title>Social Web Blog</title> <author> <name>A Googler</name> <email>noreply@blogger.com</email> </author> <generator version="7.00" uri="http://www.blogger.com">Blogger</generator> <link rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SocialWebBlog" /> <entry> <id>tag:blogger.com,1999:blog-3188762512334365442.post-8190772326434476744</id> <published>2010-07-19T14:14:00.001-07:00</published> <updated>2010-07-19T14:32:28.168-07:00</updated> <title>Announcing New Google Buzz API features</title> <content type="html"> ... </content> <link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/31887625123343654 <author> <name>Timothy Jordan</name> <uri>http://www.blogger.com/profile/14618592793335366108</uri> <email>noreply@blogger.com</email> <gd:extendedProperty name="OpenSocialUserId" value="14459911890912057787" /> </author> <thr:total>7</thr:total>
  27. 27. Developer DayGoogle 2010 Atom <?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <id>tag:blogger.com,1999:blog-3188762512334365442</id> <updated>2010-09-21T13:17:05.777-07:00</updated> <title>Social Web Blog</title> <author> <name>A Googler</name> <email>noreply@blogger.com</email> </author> <generator version="7.00" uri="http://www.blogger.com">Blogger</generator> <link rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SocialWebBlog" /> <entry> <id>tag:blogger.com,1999:blog-3188762512334365442.post-8190772326434476744</id> <published>2010-07-19T14:14:00.001-07:00</published> <updated>2010-07-19T14:32:28.168-07:00</updated> <title>Announcing New Google Buzz API features</title> <content type="html"> ... </content> <link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/31887625123343654 <author> <name>Timothy Jordan</name> <uri>http://www.blogger.com/profile/14618592793335366108</uri> <email>noreply@blogger.com</email> <gd:extendedProperty name="OpenSocialUserId" value="14459911890912057787" /> </author>
  28. 28. Developer DayGoogle 2010 Atom <?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <id>tag:blogger.com,1999:blog-3188762512334365442</id> <updated>2010-09-21T13:17:05.777-07:00</updated> <title>Social Web Blog</title> <author> <name>A Googler</name> <email>noreply@blogger.com</email> </author> <generator version="7.00" uri="http://www.blogger.com">Blogger</generator> <link rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SocialWebBlog" /> <entry> <id>tag:blogger.com,1999:blog-3188762512334365442.post-8190772326434476744</id> <published>2010-07-19T14:14:00.001-07:00</published> <updated>2010-07-19T14:32:28.168-07:00</updated> <title>Announcing New Google Buzz API features</title> <content type="html"> ... </content> <link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/31887625123343654 <author> <name>Timothy Jordan</name> <uri>http://www.blogger.com/profile/14618592793335366108</uri> <email>noreply@blogger.com</email> <gd:extendedProperty name="OpenSocialUserId" value="14459911890912057787" />
  29. 29. Developer DayGoogle 2010
  30. 30. Developer DayGoogle 2010 code.google.com/p/pubsubhubbub
  31. 31. Developer DayGoogle 2010 PubSubHubbub Publisher SubscriberHub
  32. 32. Developer DayGoogle 2010 PubSubHubbub 1.Subscriber gets Publisher’s feed. The feed contains a link to the Hub. Publisher Subscriber Give me your latest content for feed X, please.
  33. 33. Developer DayGoogle 2010 PubSubHubbub 1.Subscriber gets Publisher’s feed. The feed contains a link to the Hub. Publisher Subscriber I've delegated distribution of that content to this Hub.
  34. 34. Developer DayGoogle 2010 PubSubHubbub 2.Subscriber POSTs subscription request to the Hub. The request contains the URL where the Hub should POST new updates to the Subscriber. Publisher SubscriberHub I want to subscribe to feed X. Send updates to this URL
  35. 35. Developer DayGoogle 2010 PubSubHubbub 3.Hub hits the URL to verify the request was authentic; Subscriber responds with confirmation to the Hub. Publisher SubscriberHub Hey there! Did you really send this request?
  36. 36. Developer DayGoogle 2010 PubSubHubbub 3.Hub hits the URL to verify the request was authentic; Subscriber responds with confirmation to the Hub. Publisher SubscriberHub Yup, that was really me, not a DoS attacker.
  37. 37. Developer DayGoogle 2010 PubSubHubbub 4.a) Publisher notifies Hub about updates by POSTing feed URLs to the Hub; Hub pulls the feed again to find new entries. I have new content for feed X for you! Publisher SubscriberHub
  38. 38. Developer DayGoogle 2010 PubSubHubbub Give me your latest content for feed X, please. Publisher SubscriberHub 4.a) Publisher notifies Hub about updates by POSTing feed URLs to the Hub; Hub pulls the feed again to find new entries.
  39. 39. Developer DayGoogle 2010 PubSubHubbub Here you go. Publisher SubscriberHub 4.a) Publisher notifies Hub about updates by POSTing feed URLs to the Hub; Hub pulls the feed again to find new entries.
  40. 40. Developer DayGoogle 2010 PubSubHubbub 4.b) If the Publisher does not inform the Hub, the Hub will periodically poll the Publisher’s feed for new updates. Give me your latest content for feed X, please. Publisher SubscriberHub
  41. 41. Developer DayGoogle 2010 PubSubHubbub Here you go. Publisher SubscriberHub 4.b) If the Publisher does not inform the Hub, the Hub will periodically poll the Publisher’s feed for new updates.
  42. 42. Developer DayGoogle 2010 PubSubHubbub New update to feed X! Here you go. Publisher SubscriberHub 5.When Hub receives new update to feed X, it POSTs the update to the Subscriber’s endpoint URL.
  43. 43. Developer DayGoogle 2010 PubSubHubbub New update to feed X! Here you go. Publisher SubscriberHub 6.If feed X has multiple subscribers, the Hub sends updates to all of them. This reduces load on the Publisher. SubscriberSubscriberSubscriberSubscriberSubscriber
  44. 44. Developer DayGoogle 2010 PubSubHubbub
  45. 45. Developer DayGoogle 2010 code.google.com/p/pubsubhubbub
  46. 46. Developer DayGoogle 2010 salmon-protocol.org
  47. 47. Developer DayGoogle 2010 Salmon Source Aggregator PubSubHubbub I have a new entry 1.New entry is posted on Source, pushed to subscribers via mechanisms such as PubSubHubbub, and re-published by an Aggregator.
  48. 48. Developer DayGoogle 2010 Salmon Source Aggregator A new entry? I will re-publish it right away. 1.New entry is posted on Source, pushed to subscribers via mechanisms such as PubSubHubbub, and re-published by an Aggregator. PubSubHubbub
  49. 49. Developer DayGoogle 2010 Salmon Source Aggregator Salmon I have a new comment on that entry from you! 2.New comment is posted on the Aggregator. It pushes the comment back upstream to the Source using Salmon
  50. 50. Developer DayGoogle 2010 Salmon Source Aggregator 2.New comment is posted on the Aggregator. It pushes the comment back upstream to the Source using Salmon A new comment? I will publish it in the thread right away [*]. Salmon [*] After using magic security pixie dust to verify provenance.
  51. 51. Developer DayGoogle 2010 Salmon Source Aggregator 3.The Source pushes the comment to all subscribers. PubSubHubbub AggregatorAggregatorAggregatorAggregatorAggregatorAggregator I have a new comment.
  52. 52. Developer DayGoogle 2010 Salmon Source Aggregator 3.The Source pushes the comment to all subscribers. PubSubHubbub AggregatorAggregatorAggregatorAggregatorAggregatorAggregator Thanks, we'll re- publish this right away.
  53. 53. Developer DayGoogle 2010 Salmon Source 3.The Source pushes the comment to all subscribers. Aggregator Salmon I have a new comment on that entry from you!
  54. 54. Developer DayGoogle 2010 Salmon Source 3.The Source pushes the comment to all subscribers. Aggregator Salmon A new comment? I will publish it in the thread right away.
  55. 55. Developer DayGoogle 2010 Salmon Source Aggregator 3.The Source pushes the comment to all subscribers. PubSubHubbub AggregatorAggregatorAggregatorAggregatorAggregatorAggregator Thanks, we'll re- publish this right away. Aggregator Salmon
  56. 56. Developer DayGoogle 2010 salmon-protocol.org
  57. 57. Developer DayGoogle 2010 activitystrea.ms
  58. 58. Developer DayGoogle 2010 Activity Streams Actor
  59. 59. Developer DayGoogle 2010 Actor Verb Activity Streams
  60. 60. Developer DayGoogle 2010 Actor Verb Object Activity Streams
  61. 61. Developer DayGoogle 2010 Timothy Posts A Note Activity Streams
  62. 62. Developer DayGoogle 2010 Barack Obama Started Following Timothy Jordan Activity Streams
  63. 63. Developer DayGoogle 2010 Timothy Jordan Started Following Barack Obama Activity Streams
  64. 64. Developer DayGoogle 2010 Timothy Jordan Has Tea With Bella Swan Activity Streams
  65. 65. Developer DayGoogle 2010 Timothy Jordan Has Tea With Bella Swan Activity Streams
  66. 66. Developer DayGoogle 2010 activitystrea.ms
  67. 67. Developer DayGoogle 2010
  68. 68. Developer DayGoogle 2010
  69. 69. Google Buzz API
  70. 70. Developer DayGoogle 2010 Warning!
  71. 71. Developer DayGoogle 2010
  72. 72. Developer DayGoogle 2010
  73. 73. Developer DayGoogle 2010
  74. 74. Developer DayGoogle 2010 Activity Streams
  75. 75. Developer DayGoogle 2010 Actor Verb Object
  76. 76. Developer DayGoogle 2010 Timothy Posts A Note
  77. 77. Developer DayGoogle 2010      "href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:google.com, 2010:buzz:z13ispojgwqsinyij04chlupum2ytbspsa4?altu003djson",      "type": "json"     }    ],    "replies": [     {      "href": "{url}/{userId}/@self/{commentId}/@comments?alt=json",      "type": "application/json",      "count": 2,      "updated": "2010-05-09T02:53:13.730Z"     }    ]   },   "actor": {    "id": "{id}",    "name": "Timothy Jordan",    "profileUrl": "{url}/captaintimothy",    "thumbnailUrl": "{url}/captaintimothy/thumb.jpg"   },   "verbs": [    "post"   ],   "object": {    "type": "note",    "content": "content goes here",    "links": {     "alternate": [      {       "href": "http://www.google.com/buzz/a/google.com",       "type": "text/html"      }     ]    }   },
  78. 78. Developer DayGoogle 2010     }    ],    "replies": [     {      "href": "{url}/{userId}/@self/{commentId}/@comments?alt=json",      "type": "application/json",      "count": 2,      "updated": "2010-05-09T02:53:13.730Z"     }    ]   },   "actor": {    "id": "{id}",    "name": "Timothy Jordan",    "profileUrl": "{url}/captaintimothy",    "thumbnailUrl": "{url}/captaintimothy/thumb.jpg"   },   "verbs": [    "post"   ],   "object": {    "type": "note",    "content": "content goes here",    "links": {     "alternate": [      {       "href": "http://www.google.com/buzz/a/google.com",       "type": "text/html"      }     ]    }   },   "source": {    "title": "Buzz"   },   "visibility": {    "entries": [
  79. 79. Developer DayGoogle 2010      "type": "json"     }    ],    "replies": [     {      "href": "{url}/{userId}/@self/{commentId}/@comments?alt=json",      "type": "application/json",      "count": 2,      "updated": "2010-05-09T02:53:13.730Z"     }    ]   },   "actor": {    "id": "{id}",    "name": "Timothy Jordan",    "profileUrl": "{url}/captaintimothy",    "thumbnailUrl": "{url}/captaintimothy/thumb.jpg"   },   "verbs": [    "post"   ],   "object": {    "type": "note",    "content": "content goes here"    }   },   "source": {    "title": "Buzz"   },   "visibility": {    "entries": [     {      "id": "https://www.googleapis.com/buzz/v1/people/@me/@groups/@public?altu003djson",      "title": "Public"     }    ]   }  }
  80. 80. Developer DayGoogle 2010 {   "kind": "buzz#activity",   "title": "note to self",   "published": "2010-05-09T02:53:13.000Z",   "updated": "2010-05-09T02:53:13.730Z",    "id": "tag:google.com,2010:buzz:foo",   "links": {    "liked": [     {      "href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:google.com, 2010:buzz:z13ispojgwqsinyij04chlupum2ytbspsa4/@liked?altu003djson",      "type": "application/json",      "count": 0     }    ],    "alternate": [     {      "href": "http://www.google.com/buzz/a/google.com",      "type": "text/html"     }    ],    "self": [     {      "href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:google.com, 2010:buzz:z13ispojgwqsinyij04chlupum2ytbspsa4?altu003djson",
  81. 81. Developer DayGoogle 2010 {   "kind": "buzz#activity",   "title": "note to self",   "published": "2010-05-09T02:53:13.000Z",   "updated": "2010-05-09T02:53:13.730Z",    "id": "tag:google.com,2010:buzz:foo",   "links": {    "liked": [     {      "href": "{url}/{userid}/@self/{commentId}/@liked?alt=json",      "type": "application/json",      "count": 4, "updated": "2010-05-09T02:53:13.730Z"     }    ],    "alternate": [     {      "href": "http://www.google.com/buzz/a/google.com",      "type": "text/html"     }    ],    "self": [     {      "href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:google.com, 2010:buzz:z13ispojgwqsinyij04chlupum2ytbspsa4?altu003djson",      "type": "json"
  82. 82. Developer DayGoogle 2010    ],    "alternate": [     {      "href": "http://www.google.com/buzz/a/google.com",      "type": "text/html"     }    ],    "self": [     {      "href": "https://www.googleapis.com/buzz/v1/activities/110242419133439594545/@self/tag:google.com, 2010:buzz:z13ispojgwqsinyij04chlupum2ytbspsa4?altu003djson",      "type": "json"     }    ],    "replies": [     {      "href": "{url}/{userId}/@self/{commentId}/@comments?alt=json",      "type": "application/json",      "count": 2,      "updated": "2010-05-09T02:53:13.730Z"     }    ]   },   "actor": {    "id": "110242419133439594545",    "name": "Timothy Jordan",    "profileUrl": "{url}/captaintimothy",    "thumbnailUrl": "{url}/captaintimothy/thumb.jpg"   },   "verbs": [    "post"   ],   "object": {
  83. 83. Developer DayGoogle 2010    "profileUrl": "{url}/chabotc",    "thumbnailUrl": "{url}/chabotc/thumb.jpg"   },   "verbs": [    "post"   ],   "object": {    "type": "note",    "content": "content goes here",    "links": {     "alternate": [      {       "href": "http://www.google.com/buzz/a/google.com",       "type": "text/html"      }     ]    }   },   "source": {    "title": "Buzz"   },   "visibility": {    "entries": [     {      "id": "https://www.googleapis.com/buzz/v1/people/@me/@groups/@public?altu003djson",      "title": "Public"     }    ]   }  }
  84. 84. Developer DayGoogle 2010    "profileUrl": "{url}/chabotc",    "thumbnailUrl": "{url}/chabotc/thumb.jpg"   },   "verbs": [    "post"   ],   "object": {    "type": "note",    "content": "content goes here",    "links": {     "alternate": [      {       "href": "http://www.google.com/buzz/a/google.com",       "type": "text/html"      }     ]    }   },   "source": {    "title": "Buzz"   },   "visibility": {    "entries": [     {      "id": "{url}/people/@me/@groups/@public?alt=json",      "title": "Public"     }    ]   }  }
  85. 85. Developer DayGoogle 2010    "content": "content goes here",    "links": {     "alternate": [      {       "href": "http://www.google.com/buzz/a/google.com",       "type": "text/html"      }     ]    }   },   "source": {    "title": "Buzz"   },   "visibility": {    "entries": [     {      "id": "{url}/people/@me/@groups/@public?alt=json",      "title": "Public"     }    ] }, "geocode": "37.783471 -122.39922", "address": "701-737 Folsom St, San Francisco, CA 94103, USA", "placeName": "300 3rd St, San Francisco, CA 94107" }  }
  86. 86. Developer DayGoogle 2010
  87. 87. Developer DayGoogle 2010     "object": {      "type": "note",      "content": "content goes here", "attachments": [ { "type": "article", "title": "Name of the link", "links": { "alternate": [ { "href": "{url}/to/article.html", "type": "text/html" } ] } } ]     }
  88. 88. Developer DayGoogle 2010
  89. 89. Developer DayGoogle 2010     "object": {      "type": "note",      "content": "content goes here",      "attachments": [       {        "type": "photo",        "links": {         "preview": [          {           "href": "{url}/image_thumb.jpg",           "type": "image/jpeg"          }         ],         "enclosure": [          {           "href": "{url}/image.jpg",           "type": "image/jpeg",           "height": 190,           "width": 260          }         ]        }       }      ]     }
  90. 90. Developer DayGoogle 2010     "object": {      "type": "note",      "content": "content goes here", "attachments": [ { "type": "video", "title": "video description goes here", "links": { "alternate": [ { "href": "http://www.youtube.com/watch?v=abcdef", "type": "text/html" } ], "preview": [ { "href": "{url}/default.jpg", "type": "image/jpeg" }, { "href": "{url}/proxy?thumbnail_default.jpg", "type": "image/jpeg" } ] }
  91. 91. Developer DayGoogle 2010 Favorite Follow Friend Join Play Post Save Share Tag Update Article Audio Bookmark Comment File Folder Group List Note Person Photo Photo Album Place Playlist Product Review Service Status Video Verbs Objects
  92. 92. Developer DayGoogle 2010 Favorite Follow Friend Join Play Post Save Share Tag Update Article Audio Bookmark Comment File Folder Group List Note Person Photo Photo Album Place Playlist Product Review Service Status Video Verbs Objects
  93. 93. Developer DayGoogle 2010
  94. 94. Developer DayGoogle 2010
  95. 95. Developer DayGoogle 2010 Activity Streams
  96. 96. Developer DayGoogle 2010 https://www.google.com/buzz/api/auth/OAuthAuthorizeToken ?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fbuzz &domain=www.example.org &oauth_token= Auth url: https://www.google.com/buzz/api/auth/OAuthAuthorizeToken scope: https://www.googleapis.com/auth/buzz domain: www.example.org iconUrl: http://www.example.org/icon.png
  97. 97. Developer DayGoogle 2010
  98. 98. Developer DayGoogle 2010
  99. 99. Developer DayGoogle 2010
  100. 100. Developer DayGoogle 2010
  101. 101. Developer DayGoogle 2010 PubSubHubbub
  102. 102. Developer DayGoogle 2010
  103. 103. Photo credit: Nandhp, used under the Creative Commons Attribution-Share Alike 3.0 Unported license. Developer DayGoogle 2010
  104. 104. Developer DayGoogle 2010
  105. 105. Developer DayGoogle 2010
  106. 106. Developer DayGoogle 2010
  107. 107. Examples
  108. 108. Developer DayGoogle 2010 buzz-bingo.appspot.com
  109. 109. Developer DayGoogle 2010
  110. 110. Developer DayGoogle 2010
  111. 111. Developer DayGoogle 2010
  112. 112. Developer DayGoogle 2010
  113. 113. Developer DayGoogle 2010
  114. 114. Developer DayGoogle 2010
  115. 115. Developer DayGoogle 2010
  116. 116. Developer DayGoogle 2010
  117. 117. Developer DayGoogle 2010
  118. 118. Developer DayGoogle 2010
  119. 119. Developer DayGoogle 2010 Sign-In & Auth for Buzz client = buzz.Client() client.build_oauth_consumer(   OAUTH_CONSUMER_KEY,   OAUTH_CONSUMER_SECRET ) client.oauth_scopes.append(   buzz.FULL_ACCESS_SCOPE )
  120. 120. Developer DayGoogle 2010 Sign-In & Auth for Buzz request_token =   client.fetch_oauth_request_token(     'http://example.com/oauth/callback/'   ) # Save request token to the data store authorization_url =   client.build_oauth_authorization_url(     request_token   )
  121. 121. Developer DayGoogle 2010 # User visits the authorization_url Sign-In & Auth for Buzz
  122. 122. Developer DayGoogle 2010
  123. 123. Developer DayGoogle 2010
  124. 124. Developer DayGoogle 2010 Sign-In & Auth for Buzz verifier = request.get('oauth_verifier') # Lookup request_token in data store client.oauth_request_token = request_token access_token =   client.fetch_oauth_access_token(verifier) # Save access token to the data store
  125. 125. Developer DayGoogle 2010
  126. 126. Developer DayGoogle 2010
  127. 127. Developer DayGoogle 2010
  128. 128. Developer DayGoogle 2010
  129. 129. Developer DayGoogle 2010
  130. 130. Developer DayGoogle 2010
  131. 131. Developer DayGoogle 2010
  132. 132. Developer DayGoogle 2010 Board Marked if post.attachments:   for attachment in post.attachments:     if attachment.type == 'article':       self.award_badge('share')       break if post.geocode and     post.actor.id != self.key().name():   self.award_badge('geo') elif post.geocode:   self.award_badge('mobile')
  133. 133. Developer DayGoogle 2010 Board Marked # Create the attachments for the post badge_attachment = buzz.Attachment(   type='photo', enclosure=badge.badge_icon ) link_attachment = buzz.Attachment(   type='article',   title='Buzz Bingo',   uri='http://buzz-bingo.appspot.com/' )
  134. 134. Developer DayGoogle 2010 Board Marked # Assemble our announcement Buzz post badge_post = buzz.Post(   content=post_content,   attachments=[     badge_attachment,     link_attachment   ],   geocode=VENUE_GEOCODE,   place_id=VENUE_PLACE_ID ) # Create the post self.client.create_post(badge_post)
  135. 135. Developer DayGoogle 2010
  136. 136. Developer DayGoogle 2010
  137. 137. Developer DayGoogle 2010
  138. 138. Developer DayGoogle 2010 Bingo! if (5 in horizontal_counts) or     (5 in vertical_counts):   self.award_badge('bingo')
  139. 139. Developer DayGoogle 2010
  140. 140. Developer DayGoogle 2010 Buzz Bingo is open source! code.google.com/p/buzz-bingo buzz-bingo.appspot.com
  141. 141. Developer DayGoogle 2010 Track
  142. 142. Extras
  143. 143. Developer DayGoogle 2010 Timothy Jordan Developer Advocate, Google buzz.timothyjordan.com @timothyjordan #gdd2010jp Office Hours 16:00 - 16:30 By the “Cool API” sign Let’s Talk
  144. 144. Developer DayGoogle 2010 Links https://code.google.com/apis/buzz/docs/ http://code.google.com/p/oacurl/ http://code.google.com/p/buzz-php-client/ http://code.google.com/p/buzz-python-client/ http://code.google.com/p/buzz-java-client/ code.google.com/p/buzz-codelabs code.google.com/p/buzz-mood

×