Skip to content
Surf Wiki
Save to docs
general/rss

From Surf Wiki (app.surf) — the open knowledge base

WebSub

Distributed publish-subscribe communication protocol


Distributed publish-subscribe communication protocol

WebSub (formerly PubSubHubbub) is an open protocol for distributed publish–subscribe communication on the Internet. Initially designed to extend the Atom (and RSS) protocols for data feeds, the protocol can be applied to any data type (e.g. HTML, text, pictures, audio, video) as long as it is accessible via HTTP. Its main purpose is to provide real-time notifications of changes, which improves upon the typical situation where a client periodically polls the feed server at some arbitrary interval. In this way, WebSub provides pushed HTTP notifications without requiring clients to spend resources on polling for changes.

In October 2017, PubSubHubbub was renamed to WebSub for simplicity and clarity. , the WebSub protocol has been adopted by the W3C as a Recommendation.

Protocol

Under WebSub, there is an ecosystem of publishers, subscribers, and hubs.{{cite web

A subscriber first retrieves content from an HTTP resource (URL) by requesting it from the webserver. The subscriber then inspects the contents of the response, and if it references a hub, the subscriber can subscribe to that resource's URL (it's called a 'topic' by the spec) on that hub. The subscriber needs to run a web accessible server so that hubs can directly notify it when any of its subscribed topics have updated, using a webhook mechanism.

Publishers expose their content with the inclusion of hub references in the HTTP headers. They post notifications to those referenced hubs whenever they publish something. Thus, when a publication event occurs, the publisher calls its hubs and the hubs call their subscribers.

WebSub includes a simple verification of intent mechanism in order to prevent abusive subscriptions, and a validation mechanism allows for subscriptions to private or protected web resources. When the subscriber sends the subscription request to the hub, the subscriber address and a code needs to be included. The hub immediately sends a verification message to the subscriber with the URL of the topic and the above code. The subscription request will only be accepted if the subscriber sends a positive response to the verification request of the hub.

In order to provide a secure chain, subscribers should share a secret with the hub, which will be used by the hub to compute an HMAC key that will be sent to the subscriber. The latter can then easily verify the origin by comparing the supplied signature with a similarly computed signature on their end.

Usage

WebSub is used to push content by many websites, including all blogs served by Blogger and WordPress.com, news sites including CNN and Fox News, and social networks like diaspora*, Mastodon, MySpace or Medium.com.

Subscribing services (“feed readers”) include Flipboard, Feedly, NewsBlur, among other popular options.

Community Hosted hub providers include pubsubhubbub.appspot.com (operated by Google), pubsubhubbub.superfeedr.com (operated by Superfeedr), and websubhub.com.

Superfeedr provides a detailed PubSubHubbub guide for implementation.

References

References

  1. "PubSubHubbub".
  2. (23 January 2018). "WebSub @ W3C".
  3. (23 January 2018). "WebSub W3C Recommendation 23 January 2018".
  4. (3 March 2010). "Rub-a-Dub-Dub in the PubSubHubbub".
  5. "Companies".
  6. (18 February 2014). "Superfeedr Blog - Medium supports PubSubHubbub".
  7. (4 July 2013). "State of PubSubHubbub".
  8. "Welcome to the Google PubSubHubbub Hub!".
  9. "Superfeedr Open PubSubHubbub Hub".
  10. "WebSubHub".
  11. (10 February 2015). "Superfeedr Blog - How to implement PubSubHubbub".
Info: Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about WebSub — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report