appdotnet / api-spec

App.net API Documentation is on the web at https://developers.app.net. Source for these docs is in the new-docs branch here. Please use the issue tracker and submit pull requests! Help us build the real-time social service where users and developers come first, not advertisers.

Home Page:https://developers.app.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webhooks

kennydude opened this issue · comments

I would like to see the ability to have Webhooks in ADN for a number of events that happen in the system. Similar to how Github does these with Github Services which work really well.

Built-in ones could be GCM, HTTP Post and a few others (iOS push or whatever, although I know it's not as extensible as GCM).

"But we have streams for this" - True, this is how you would roughly get a mention to someone with a stream:

Diagram

That's a lot of work just for a mention to be sent to a phone! That means it costs more in money and servers that we don't need. Using webhooks, we could get down to this:

Diagram

It could also be used to subscribe to events such as:

  • Profile changes (so everything is always up to date!)
  • Follow/Unfollow someone (keep caches up to date!)
  • Stream Markers - If I'm on the computer and read something, I don't want to see the same stuff as "new" on my phone and this would keep it up-to-date 100% of the time!

What do you guys think?

I agree that the current stream type of "long polling" is not ideal. It is somewhat more of a burden on the developer to keep these persistent HTTP connections open. I would prefer something more like Facebook's subscription setup that uses an HTTP callback.

@kennydude Are you proposing ADN directly sends GCM and APN messages directly? How would that work exactly? The client registers push tokens directly with ADN? I believe there are would be some authentication/security issues with that approach.

For GCM, ADN would have a shared sender id which would be public. However,
the actual Auth token ADN would need would be secret.

Then the actual device tokens would be useless against everyone but ADN.
I'll explain a bit better later on today
On 12 Mar 2013 23:12, "Derek" notifications@github.com wrote:

I agree that the current stream type of "long polling" is not ideal. It is
somewhat more of a burden on the developer to keep these persistent HTTP
connections open. I would prefer something more like Facebook's
subscription setup that uses an HTTP callback.

@kennydude https://github.com/kennydude Are you proposing ADN directly
sends GCM and APN messages directly? How would that work exactly? The
client registers push tokens directly with ADN? I believe there are would
be some authentication/security issues with that approach.


Reply to this email directly or view it on GitHubhttps://github.com//issues/308#issuecomment-14812048
.

There would be no security issues. In fact, less than adding another server in between because otherwise you have this issue of potentially privacy concious information being transferred to a server we know nothing about. (You can strip out private content from GCM and simply ping apps to say "there's new data, fetch it when you're ready")