w3c/websub

High Level Architecture

Closed this issue · 5 comments

A high level architecture diagram would be useful for visualizing communication between publisher, hub & subscriber.

Also... I'm imagining each hub would need some kind of store to manage subscriptions/keys/callback urls, etc.. Any thoughts on that or examples of hub implementations ?

The diagrams here do a pretty good job of illustrating it: https://www.programmableweb.com/news/what-pubsubhubbub-push-styled-api-and-how-does-it-work/analysis/2017/04/03

I can take a stab at creating something similar that can be used in the spec.

I wrote an open source hub you can look at: https://github.com/aaronpk/Switchboard

@aaronpk thanks for the list of resources. I'm attempting to do the same in Node.js: https://github.com/danielduhh/websub-hub

I'm wondering - did you implement 5.3 Hub Verifies Intent of the Subscriber ? It seems odd that the callback url (probably a POST) would have a GET method that's solely responsible for responding to submission requests w/ challenge/mode/topic

@danielduhh Yeah that GET vs POST distinction is mentioned in the green "note" section here: https://www.w3.org/TR/websub/#verification-details

That verification of the subscriber is a required step, otherwise it would allow anyone to create WebSub subscriptions for arbitrary URLs. It's expected that the callback URL responds to both GET and POST requests, GET requests which just echo back the challenge, and POST requests that actually process the notification.

@danielduhh I've added a diagram to the high-level overview section. Please let me know if this is helpful and what you had in mind! https://w3c.github.io/websub/#high-level-protocol-flow

@aaronpk diagram looks great, thanks !