4 ms·
If you're using a web hook to notify your users of changed content, the WebSub standard (https://www.w3.org/TR/websub/; https://www.w3.org/TR/websub/; formerly
by marten-de-vries 9y ago
If you're using a web hook to notify your users of changed content, the WebSub standard (https://www.w3.org/TR/websub/; https://www.w3.org/TR/websub/; formerly PubSubHubbub; currently a candidate recommendation) is a good option. It solves a couple (though not all) of the problems of web hooks listed in the article, including:
- Uncertain security: signing notifications is in the spec
- Development and testing: ideally, with libraries that implement the spec, you can assume that the websub part will 'just work' and only need to test your handler function.
- Misbehavior is onerous: subscribers need to actively confirm their subscription every once in a while. This might seem complex, but it allows for periodic checks if the server/client is still functioning as expected, and ideally can be handled automatically by libraries.
- Retries: the spec leaves some room here, but again, a library can handle this.
As I decided to use WebSub as an alternative for a 'plain' webhook for a project recently, I wrote a library for the Flask web framework: https://github.com/marten-de-vries/Flask-Websub https://github.com/marten-de-vries/Flask-Websub. I personally hope libraries for other frameworks will follow now the spec is moving less.
- devmunchies 9y agohow can someone stay knowledgable of all of the many reports and standards on w3.org? Do people visit there regularly? I tried looking for websub on w3.org without using a search engine and it was a challenge (finally found it)
- marten-de-vries 9y agoI found out about this standard myself indirectly during a web search. As an outsider to the w3.org process, I think the best way is to follow working groups with themes you're interested in: https://www.w3.org/Consortium/activities https://www.w3.org/Consortium/activities. For example, WebSub is worked on by the Social Web Working Group: https://www.w3.org/TR/tr-groups-all#tr_Social_Web_Working_Group https://www.w3.org/TR/tr-groups-all#tr_Social_Web_Working_Gr....