I discussed this with @tgxworld today on the call and there are complications.
What we have is this:
Current way
-
Every tab listens on message bus
-
If a notification lands, we present to user
-
When all tabs are closed desktop gets no notifications -
Simple with no vendor lock in
Push notification way
-
Service worker registers with Mozilla or Google or Microsoft
-
Server gets a notification for a user
-
Server sends encrypted blob to Mozilla or Google or Microsoft
-
Mozilla or Google or Microsoft send encrypted notification to browser
-
When all tabs are closed desktop still gets notifications -
vendors like Mozilla etc. have user IP addresses and know when we ship the IP addresses notifications
So it is not clear-cut here, if we move to pure push notifications we give up on privacy which we have no choice on mobile but plenty of choice on Desktop.
I still feel like having 2 ways of doing the same thing is not ideal so my suggestion would be:
Have 1 UI for both features, get rid of plugin
-
On Android where we have no choice we just use the push feature (which uses the same ui we already have).
-
On Desktop
-
Phase 1: we keep exactly what we have now, no changes needed
-
Phase 2: we can look at having the service worker talk directly to message bus so you still get notifications when tabs are closed (which it should probably stop after N hours of not visiting site)
-
Phase 3 (probably next year): centralize all message bus work so it happens from the service worker
-
@codinghorror thoughts?
Note: there was another alternative @tgxworld was going to investigate to see if a Discourse server can act as a push server, but I am not sure this is a
hole we want to go down.