w3c / websub

WebSub Spec in Social Web Working Group
https://w3c.github.io/websub/
285 stars 50 forks source link

Diffing for HTML with <article> #152

Open singpolyma opened 6 years ago

singpolyma commented 6 years ago

Suggestion: allow hubs to remove previously-delivered <article>s from content distribution just as previously-delivered Atom <entry> may be removed.

Or, better yet, allow conforming hubs to send only deltas in a "manner appropriate for the content type" and provide the <entry>/<article> cases as informative only.

aaronpk commented 6 years ago

We wanted to avoid needing to spell out diffing mechanisms for every conceivable format in the core spec.

The trick around this to technically remain spec compliant, while also not surprising consumers of the WebSub API, is to say that your WebSub-enabled URL returns only the latest item. That way you can send just the one <article> or whatever, and it still counts as "sending the full contents of the URL". In practice, it's fine to do this as long as the page you're sending has a concept of multiple items in a list, and if your consumers are ready to handle arbitrary numbers of items.

singpolyma commented 6 years ago

We wanted to avoid needing to spell out diffing mechanisms for every conceivable format in the core spec.

I get this, but why not just allow for format-specific diffing without specifying it? Show the atom one as an example and leave the specifics up to implementation.

aaronpk commented 6 years ago

I don't remember the exact reasoning anymore, but believe me there was a lot of discussion about this. You can probably dig up some of the past threads here if you're so inclined https://github.com/w3c/WebSub/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed+diff