Archive

Posts Tagged ‘HTTP’

Web Hooks

March 1st, 2009

Just came across Web Hooks. Looks like a new emerging concept (although the term was coined in 2006). But technically there is nothing new. Web hooks are just user-defined callbacks over HTTP. To support web hooks a web application should let the user to specify URL, to which that application will POST data when events of the user’s interest will occur. It is kind of a push mechanism from a server to a client, which is opposite to polling that is used an example for updating feeds.

What I like about it? First, that it is on the Web, over HTTP. Thus we can avoid, say, XMPP for some scenarios (though it might be wrong to compare them directly because XMPP is a protocol and web hooks are a pattern). Then web hooks nicely can be used in machine to machine (or server to server if you like) interactions. And another important point is that it’s all about integration! Not just providing notifications (you could use email) / pushing, but being able to integrate web applications and extend their functionality.

Though I have a couple of remarks on this topic. I don’t really like a word “callback” in this context. To me it sounds too RPCish. So that with a web hook we are trying to invoke some method of another application. I still hope it is not the case and rather we should deal with resources and their representations. Basically I mean we should use web hooks RESTfully. Secondly, why it is only about POSTing to the user’s URL? Of course, we need it for sending a notification, but why not to extend the concept to utilize other HTTP verbs in order to be able to build richer applications. There might be interesting cases for using GET and also DELETE. We could therefore extend existing functionality into new dimensions and create nice orchestrations of such web applications.

Uncategorized ,