top | item 8000080

(no title)

spartango | 11 years ago

Maybe I'm missing something, but:

Flipping through the documentation, the RESTful API seems to only allow for polling for new messages (deltas via the sync protocol[1]).

While I'm glad that there is a delta-API, I'm concerned that this doesn't support proper "push" notifications for new messages. This is a valuable feature of Exchange and IMAP[-IDLE](where supported).

I understand that the heterogeneity of these push protocols makes it difficult to expose a push API, but it seems an important feature of mail clients.

Similarly, it seems that REST is not quite the best protocol for the "push" piece of modern email. I suppose long-polling support on the Sync API would work fine, however.

[1]: https://www.inboxapp.com/docs/api#sync-protocol

discuss

order

grinich|11 years ago

Michael from Inbox here.

Short answer: we're working on it.

Any pushing-based API really needs to gracefully degrade to polling in case messages are lost. So we decided to first make sure the semantics of the delta sync API were great.

Under the hood we actually use features like IDLE or MS Exchange Ping, so our push updates will also be immediate. The benefit of the delta sync API is that you can query deltas (obviously), which isn't supported by IMAP.

jkarneges|11 years ago

Love the sync API. It should be easy to add long-polling support to the sync endpoint, or use the sync endpoint when any other push delivery mechanisms fail.

You might check out https://fanout.io/ which makes it easy to create realtime APIs. (disclaimer: I'm from Fanout)

andyfowler|11 years ago

I'm not entirely sure yet, but glancing around the docs, it seems like the way to do this is via their webhooks[1].

Agreed, that push is one of the more important components to a service like this.

[1]: https://github.com/inboxapp/inbox/blob/master/inbox/docs/api...

spartango|11 years ago

Webhooks would address this challenge for a certain class of applications (those with their own server component), but if you imagine building a solid desktop email app (APNS/GCM not used), then you have a problem.

I'm glad they're thinking about it, though!

grinich|11 years ago

Yep, you can set up a webhook with `*` filter criteria, but I think OP was talking about a more specific notification system for the delta sync endpoint.