HOME

TheInfoList



OR:

WebSub (formerly PubSubHubbub) is an
open protocol Open or OPEN may refer to: Music * Open (band), Australian pop/rock band * The Open (band), English indie rock band * ''Open'' (Blues Image album), 1969 * ''Open'' (Gotthard album), 1999 * ''Open'' (Cowboy Junkies album), 2001 * ''Open'' (YF ...
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 Notification may refer to: *Notification (Holy See), an announcement by a department of the Roman Curia *Casualty notification, the process of notifying relatives of people who have been killed or seriously injured *Death notification, the proces ...
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. 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 A webhook in web development is a method of augmenting or altering the behavior of a web page or web application with custom callbacks. These callbacks may be maintained, modified, and managed by third-party users and developers who may not neces ...
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 In cryptography, an HMAC (sometimes expanded as either keyed-hash message authentication code or hash-based message authentication code) is a specific type of message authentication code (MAC) involving a cryptographic hash function and a secret ...
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 A blog (a Clipping (morphology), truncation of "weblog") is a discussion or informational website published on the World Wide Web consisting of discrete, often informal diary-style text entries (posts). Posts are typically displayed in Reverse ...
and WordPress.com, news sites including
CNN CNN (Cable News Network) is a multinational cable news channel headquartered in Atlanta, Georgia, U.S. Founded in 1980 by American media proprietor Ted Turner and Reese Schonfeld as a 24-hour cable news channel, and presently owned by t ...
and Fox News, and social networks like diaspora*,
Mastodon A mastodon ( 'breast' + 'tooth') is any proboscidean belonging to the extinct genus ''Mammut'' (family Mammutidae). Mastodons inhabited North and Central America during the late Miocene or late Pliocene up to their extinction at the end of the ...
, MySpace or
Medium.com Medium is an American online publishing platform developed by Evan Williams and launched in August 2012. It is owned by A Medium Corporation. The platform is an example of social journalism, having a hybrid collection of amateur and professio ...
. Subscribing services (“feed readers”) include
Flipboard Flipboard is a news aggregator and social network aggregation company based in Palo Alto, California, with offices in New York, Vancouver, and Bejiing. Its software, also known as Flipboard, was first released in July 2010. It aggregates conten ...
,
Feedly Feedly is a news aggregator application for various web browsers and mobile devices running iOS and Android. It is also available as a cloud-based service. It compiles news feeds from a variety of online sources for the user to customize and ...
,
NewsBlur NewsBlur is an American software company based in New York City and San Francisco. It runs an online RSS news reader service accessible both online and via a free open-source mobile app for offline reading. Furthermore, the software powering New ...
, among other popular options. Community Hosted hub providers include pubsubhubbub.appspot.com (operated by Google), pubsubhubbub.superfeedr.com (operated by
Superfeedr Superfeedr is a feed API built on WebSub, which is sometimes referred to as PuSH. It transforms a variety of feeds into standardized RSS, Atom (standard), Atom, or JSON format and distributes (or "pushes") them via WebSub or XMPP. This allows subs ...
), and websubhub.com. Superfeedr provides a detailed PubSubHubbub guide for implementation.


See also

* Publish–subscribe pattern *
RSS Cloud RSS Cloud is an optional sub-element of the RSS protocol's <channel> element that enables realtime (immediate) push notifications or distributed publish/subscribe communication for feeds. This is done using a element allowing a software s ...
*
RSS to email RSS ( RDF Site Summary or Really Simple Syndication) is a web feed that allows users and applications to access updates to websites in a standardized, computer-readable format. Subscribing to RSS feeds can allow a user to keep track of many di ...


References

{{W3C standards RSS (file format) Web syndication formats XML-based standards Computer file formats Google World Wide Web Consortium standards