Switch to Web Push API?
There is already a Web Push API for decentralized push notifications. It would be great if this API was shared by OpenPush so that services wanting to send Push Notifications can reused the same client code.
https://w3c.github.io/push-api/
Now that doc covers a lot more than what is needed, as it includes the JavaScript client API. However The interesting bit is the Server to Server API. The TL;DR is that the JavaScript client gets a URL and an encryption key from the browser, then it can send those to the server. The server then uses the URL and key to send the push notifications.
Implementing something similar in OpenPush would just require creating a Java client API which returns the URL and token. The server can then behave in the exact same way.
Benefits:
- Reuse a standard API instead of fighting all services to implement push notifications differently for Google Cloud Messaging, Web Push and Open Push.
- Possibly can reuse the Mozilla push server implementation? https://github.com/mozilla-services/autopush (Although it relies on Amazon's Dynamo DB
🤢 ) - End to End encryption. (https://gitlab.com/Bubu/pushserver/-/issues/1)
- It would make implementing an OpenPush backed browser app much easier.