The document discusses using Google's social APIs like Buzz to build social applications, how to authenticate with OAuth to access user data, and how PubSubHubbub can be used to receive real-time notifications from publishers without polling by subscribing through a hub. It also briefly mentions Google's different data access levels like Firehose and Gardenhose and provides some example applications and links for further information.
16. OAuth
Your Service
Application Get unauthorized Provider
request token
1. Your application gets an unauthorized request
token from the Service Provider’s authorization
server.
17. OAuth
Your Service
Application 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.
18. OAuth
Your Service
Application Get authorized Provider
request token
3. Your application gets an authorized request token
from the authorization server.
19. OAuth
Your Service
Application Exchange request Provider
for access token
4. You exchange the authorized request token for an
access token.
20. OAuth
Your Service
Application Use access token Provider
to get data
5. You use the access token to request data from
Service Provider’s service access servers.
28. PubSubHubbub
Give
me your latest
content for feed
X, please.
Publisher Subscriber
1. Subscriber gets Publisher’s feed. The feed
contains a link to the Hub.
29. PubSubHubbub
I've delegated
distribution of that
content to this Hub.
Publisher Subscriber
1. Subscriber gets Publisher’s feed. The feed
contains a link to the Hub.
30. PubSubHubbub
I want to
subscribe to feed
X. Send updates to
this URL
Publisher Hub Subscriber
2. Subscriber POSTs subscription request to the Hub.
The request contains the URL where the Hub
should POST new updates to the Subscriber.
31. PubSubHubbub
Hey there! Did
you really send this
request?
Publisher Hub Subscriber
3. Hub hits the URL to verify the request was
authentic; Subscriber responds with confirmation to
the Hub.
32. PubSubHubbub
Yup, that was
really me, not a DoS
attacker.
Publisher Hub Subscriber
3. Hub hits the URL to verify the request was
authentic; Subscriber responds with confirmation to
the Hub.
33. PubSubHubbub
I have new
content for feed
X for you!
Publisher Hub Subscriber
4. a) Publisher notifies Hub about updates by
POSTing feed URLs to the Hub; Hub pulls the feed
again to find new entries.
34. PubSubHubbub
Give me
your latest
content for feed
X, please.
Publisher Hub Subscriber
4. a) Publisher notifies Hub about updates by
POSTing feed URLs to the Hub; Hub pulls the feed
again to find new entries.
35. PubSubHubbub
Here you go.
Publisher Hub Subscriber
4. a) Publisher notifies Hub about updates by
POSTing feed URLs to the Hub; Hub pulls the feed
again to find new entries.
36. PubSubHubbub
Give me
your latest
content for feed
X, please.
Publisher Hub Subscriber
4. b) If the Publisher does not inform the Hub, the
Hub will periodically poll the Publisher’s feed for
new updates.
37. PubSubHubbub
Here you go.
Publisher Hub Subscriber
4. b) If the Publisher does not inform the Hub, the
Hub will periodically poll the Publisher’s feed for
new updates.
38. PubSubHubbub
New update
to feed X! Here
you go.
Publisher Hub Subscriber
5. When Hub receives new update to feed X, it
POSTs the update to the Subscriber’s endpoint
URL.
39. PubSubHubbub
New update
to feed X! Here
you go.
Publisher Hub Subscriber
Subscriber
Subscriber
Subscriber
Subscriber
Subscriber
6. If feed X has multiple subscribers, the Hub sends
updates to all of them. This reduces load on the
Publisher.
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
PubSubHubbub, real-time data syndication\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
-PubSubHubbub enabled feeds are identified by the presence of a link element with a rel value of "hub" beneath the feed element. For example, the following feed has a "hub" URL of http://pubsubhubbub.appspot.com/.\n-send a subscription request to the hub identifying the feed you would like to receive updates for, as well as your application's callback URL where updates should be sent\n-the hub will send a verification request to your application's callback URL. To confirm the subscription, your application must respond with an HTTP success (2xx) code with a response body that contains the hub.challenge parameter that was provided in the hub's verification request. Note that the hub may continue to send subsequent verification requests like this in the future to ensure that your application still wishes to receive updates. If at any time you do not wish to receive updates anymore, simply respond to the verification request with an HTTP Not Found (404) code.\n-Once you have successfully subscribed with the hub to receive updates, you should begin to see HTTP POST requests to your callback URL which include the Atom formatted Buzz activities. Your application must respond with an HTTP success (2xx) code to these requests to signify to the hub that you have received the updates.\n\n
The future is distributed: There will be big hubs, many small hubs, and tons of publishers and subscribers. Publishers, subscribers, and hubs may play multiple roles.\n
\n
\n
Photo: http://www.nps.gov/dena/bear-safety.htm\n(US Government photo)\n
Photo: http://www.nps.gov/dena/bear-safety.htm\n(US Government photo)\n