Live data from Hacker News

REST Hooks - Stop the polling madness

resthooks.org

1–10 of 117 posts

Re: REST Hooks - Stop the polling madness

#3
We also wrote a quick drop-in Django application [0] (that plugs right into TastyPie if you have an API built on it) . We also have a sample CRM with a live API running [1]. Our friends at NetEngine wrote a sample Rails app [2], and our very own James wrote an awesome Node.js Sails app [3].

[0] https://github.com/zapier/django-rest-hooks

[1] http://demo.resthooks.org/

[2] https://github.com/net-engine/resthooks

[3] https://github.com/zapier/node-resthooksdemo

Re: REST Hooks - Stop the polling madness

#5

Oh neat! We're launching resthooks.org today with several partners to promote an existing but underused real-time API pattern. Here are more resources: Intro: https://zapier.com/engineering/introducing-resthooksorg/ Why: http://resthooks.org/#why Demo: http://demo.resthooks.org/

I'm looking for a quick response to "How", w/o going through code. Care to enlighten me?

Re: REST Hooks - Stop the polling madness

#6
post #4

I don't really understand what this is. Is this an attempt at a formalization of webhooks + JSON?

Same here - I keep coming back to "are they just talking about webhooks? or are they also talking about some kind of persistent http streaming api?"

I'm thinking these are just Webhooks, but the REST part is throwing me off because I think of it more as a consumption concept (consuming resources, etc).

Update: Found this, which I think explained it best: "REST Hooks itself is not a specification, it is a collection of patterns that treat webhooks like subscriptions. These subscriptions are manipulated via a REST API just like any other resource. That's it. Really." - but it was in /docs, not the main page.

Re: REST Hooks - Stop the polling madness

#7
post #4

I don't really understand what this is. Is this an attempt at a formalization of webhooks + JSON?

Its not. Its promoting two things specifically:

1. Webhooks

2. A subscription layer via REST

Several major players already are doing this but it doesnt have a name.

REST Hooks are a way to consolidate that momentum and push it to a broarder audience.

Re: REST Hooks - Stop the polling madness

#8
Am I the only one who has trouble sifting through all this marketing? Even "read more" link leads to an article where half of the text promises what will be covered and another half talks about some subscriptions and how they are managed (they might have been mentioned in the first half, I agree - and I also read text only twice).

If someone has a better understanding of how this works, I would appreciate a TL;DR version for programmers (which are probably the target audience?). Thanks!

Re: REST Hooks - Stop the polling madness

#9
post #4

I don't really understand what this is. Is this an attempt at a formalization of webhooks + JSON?

It is just a pattern around making traditional webhooks another resource on your existing REST API so you can programmatically control subscriptions/callbacks/webhooks/etc. instead of asking users to copy-paste URLs.

Re: REST Hooks - Stop the polling madness

#10
This sounds like webhooks, but they have a set payload, so that the server that is sent the webhook just calls the rest endpoint it is given in the payload. Interesting idea, but it does sound like a regular webhook to me. That flow is the same way I use the Stripe webhooks for instance. I use the event id and make a call to Stripe directly, so that I can make sure the event is real.
Post reply on HN