Hacker News new | past | comments | ask | show | jobs | submit login

Does the Fastmail app rely entirely on OS implementations of push notifications for this? Or is there some kind of push functionality in JMAP?



The apps use OS/platform push for notifications, because the webapp component is asleep at the time. When the app is active, its just the regular webapp, which uses eventsource.

The JMAP spec provides for eventsource and webhooks, but obviously an individual provider can offer more than that via an extension. When we do switch over to JMAP, we'll continue to use our custom method to register platform notifications.


> which uses event source

> If the client sent some data down the connection to the server. Unfortunately the eventsource specification doesn’t provide any way to do this;

Solution: use websocket, which the client can actively ping the server.


It's not "just" use websockets. These may be intercepted by proxies with connection limits, timeouts or just plain not understanding websockets at all.

You will need to detect this and apply a fallback mechanism.

Which goes back to the point of this post: easy in theory. Much harder in practice.

Where I work we ended up using Microsoft's signalr-library to avoid having to learn and tackle all of these issues ourselves.

Yet we still needed to add some additional Band-Aids around the libraries provided to be able to support all cases we wanted seamlessly.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: