ArticleslgStudy

computer science

WebSub

WebSub is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand WebSub rather than just read about it. In short: 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.

Key takeaways

  • WebSub belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect WebSub to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of WebSub from memory before moving on to harder problems.

Reference excerpt

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. As of January 2018, 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 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.

See also Publish–subscribe pattern RSS Cloud RSS to email

References

Worked examples

Example 1 — a first encounter with WebSub

Start with the simplest possible case. Write down what WebSub claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to WebSub before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about WebSub ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of WebSub

In research
WebSub appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses WebSub in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
WebSub is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer file formats, RSS, Web syndication formats, so understanding it makes those chapters shorter.
In everyday life
Look for WebSub outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “WebSub” →

How to study WebSub in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what WebSub means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain WebSub out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is WebSub in simple terms?

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.

Why does WebSub matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study WebSub?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on WebSub.

Tags

  • Computer file formats
  • RSS
  • Web syndication formats
  • World Wide Web Consortium standards
  • XML-based standards

Keep exploring