Centralized push notifications system

At present, every SailfishOS app that wishes to send push notifications must maintain its own background connection (via WebSocket, MQTT, etc.). If every app maintains its own connection, won’t this drain the battery more as the user installs more apps?

Does Jolla have any plans to implement a centralised push notification system, similar to Firebase (Android) and APNs (Apple), which would allow devices to maintain just a single connection (to the SailfishOS servers) and thus limit the need for each app to maintain its own background connection?

Another solution would be to get in touch with the UnifiedPush team to find out whether integration with SailfishOS would be possible (there is apparently already a Linux integration). This is an open-source, decentralised system that uses a single daemon to manage all push connections, then forwards notifications to applications via D-Bus. This would save resources and simplify development.

What do you think?

10 Likes

Which app exceppt the Jolla store and the System Update use Jollas Servers for notification?

Is this really necessary? I mean, you can listen on an open port for messages, and this shouldn’t consume any noticeable resources (there’s no need to do interval polling). For example, I mean the built-in IMAP (keep it always active—or whatever the correct English term is) doesn’t seem to waste any measurable resources, especially when looking at it in the top list.

2 Likes

For push notifications in apps using a connection-based protocol, the only benefit of centralizing them would be that apps wouldn’t need to implement connection and failure management themselves. But then it’s better if at least some self-hosted option (like UnifiedPush) is available, since having a centralized server for Sailfish OS just like Apple and Google have does not sound like a good idea.

For protocols that need regular polling, Sailfish OS already has GitHub - sailfishos/nemo-keepalive · GitHub, which is supposed to save battery power by waking up all apps together at predefined intervals.

9 Likes

It has been discussed at some point in the past -multiple times also i think- but nothing came out of it.

Would be useful i think for messaging apps or wherever needed. If it needs to be run on jolla servers or can be done on nextcloud as an app (self hosted or not) i have no idea.

Someone would just have to write a unifiedpush distributor for sailfish (or just use kunifiedpush), the spec is pretty easy

1 Like

I’ve developed a similar solution from gotify - a push service you can self host.
This is on the harbour store already : erwanlpfr/harbour-gotifish: Unofficial Sailfish client for Gotify - Codeberg.org .

The need it fills for me is typically for VPS or self hosted alerts or services.
I believe unifiedpush could be another answer!

2 Likes

you could integrate unifiedpush into that project (make it a distributor for other apps)! as I said the spec is pretty easy

1 Like