Live data from Hacker News

Push Notifications for Decentralized Services

unifiedpush.org

41–50 of 54 posts

Re: Push Notifications for Decentralized Services

#41

Earlier quoted context omitted.

So ntfy Android app polls a ntfy service. (Which is more efficient than each app polling separately) What does Google's Android library do if not also poll? Does it run a server on the phone? Does it get special signals from cell towers that most apps don't have access to?

It also polls, it just does it as part of the OS. Power saving by the OS can often interfere with apps like nfty that want a long-running background process, especially if they haven’t been opened in a while.

Okay, thank you.

From what you're saying, it doesn't sound like the OS-based polling would be more power efficient, as someone in this chain suggested, just more reliable. Though, I think you can just turn off battery optimization for the ntfy app, in which case I'd expect them to be on par.

If that's right, it seems like ntfy with battery optimization turned off is effectively a "real" push notification system.

Re: Push Notifications for Decentralized Services

#43
post #31

Earlier quoted context omitted.

Awesome. One major caveat is that because of Sandstorm's draconian security (I mean this in a good way), a handful of ntfy's features won't work because they use special headers. Mastodon works so I'm assuming they use the json API. One of my tasks is to go through major services and test them. Another one is protected topics. "Users" use auth headers (there's a GET string option, but the Android app source code indi…

What would you say the main points are for sandstorm? Is it about hosting apps on different domains and using a powerbox between them? Or is it something more? Why does sandstorm use capnproto for instance? In our framework for instance, instead of capabilities, we implemented "invites", which people can send to each other. If an invite grants you readLevel access to a document, you'll be able to see it even before y…

I'm your example it sounds like invites are a form of capability based security, which is what sandstorm uses.

I'm not an expert, but my understanding is that sandstorm takes all of the system calls from your apps, and uses capn proto to serialize those calls to the powerbox. The powerbox then checks to see if that operation is allowed for that user, and if so it executes the call, and serializes it back to the app (which then displays it to the user, for example).

Sandstorm uses CapnP because it's technically sound, battle tested, and efficient.

You could just make http requests back and forth (that's kinda if the default for web apps) but there is latency overhead and way more surface area with http.

Re: Push Notifications for Decentralized Services

#45
post #31

Earlier quoted context omitted.

Awesome. One major caveat is that because of Sandstorm's draconian security (I mean this in a good way), a handful of ntfy's features won't work because they use special headers. Mastodon works so I'm assuming they use the json API. One of my tasks is to go through major services and test them. Another one is protected topics. "Users" use auth headers (there's a GET string option, but the Android app source code indi…

What would you say the main points are for sandstorm? Is it about hosting apps on different domains and using a powerbox between them? Or is it something more? Why does sandstorm use capnproto for instance? In our framework for instance, instead of capabilities, we implemented "invites", which people can send to each other. If an invite grants you readLevel access to a document, you'll be able to see it even before y…

Well, first and foremost, Sandstorm uses Cap'n Proto because Cap'n Proto was built, first and foremost, to enable Sandstorm. :) Though of course, now it also powers Cloudflare Workers and a bunch of other things.

My favorite explainer on the object capability model is... the first half of this exceptionally long page: http://habitatchronicles.com/2017/05/what-are-capabilities/ It's worth the read, but read it when you have time to sit down.

So access to apps or documents by users, as well as those apps and documents being able to reach out to other resources, is all generally wrapped in capabilities.

I think as a self-hosting platform, the biggest advantages of Sandstorm is that we force developers to provide a no-config-file, no-sysadmin-required experience, so Sandstorm is probably the only self-hosting platform currently intended to be used by people who are not tech people. This naturally flows into some other things: If you don't have a sysadmin running it, it needs to be really secure (capabilities) and very good at self-managing it's own performance.

So Sandstorm apps do not consume any resources unless you are accessing them. Everything is spun up and closed down on demand. And the platform's security model not only means vulnerabilities in apps mostly aren't exploitable and apps don't need to be patched, but Sandstorm strives to safely allow non-technical users to install and run potentially even malicious apps without risk.

Re: Push Notifications for Decentralized Services

#47
post #21

Earlier quoted context omitted.

The purpose of this standard is to replace Google's FCM push notifications so that you can receive push notifications on a mobile device for a bunch of services while only needing to maintain a single low-overhead connection. This exists to improve battery life and decrease data usage for android users who don't use google services or prefer to host their own. And generally it exists to provide a standardised, indepe…

> The purpose of this standard is to replace Google's FCM push notifications so that you can receive push notifications on a mobile device for a bunch of services while only needing to maintain a single low-overhead connection. Isn't the purpose of Google's push service that you can receive notifications for a bunch of services with only a single connection? I don't quite understand how adding a different service hel…

>I don't quite understand how adding a different service help

I simply don't like having two monopolies (Google and Apple) handling every single push notification for all mobile users everywhere on Earth – except in China, maybe.

There's so much you privacy risks and they can easily infer many things from the meta data alone.

I thought we were in the post-Snowden phase already.

Re: Push Notifications for Decentralized Services

#48
post #38

Earlier quoted context omitted.

> ... but if you get a notification when a mail arrives, it's most probably because your mail client uses Google or Apple's push service if you use a regular mobile device, or if you installed and configured microG. Except it doesn't? The Mail app on my iPhone doesn't use push notifications, fetch works well and I still get local notifications. No external push service at all. > Alternatively, your app isn't doing th…

> Except it doesn't? See how I introduced your case later with "Alternatively"? You saw it since you quoted me. Fine, your email app works well in fetch mode. It took you three roundtrips to mention your actual setup despite having been asked about it quite early and despite it being a critical element in this discussion. Omitting to mention that doing this choice, your notifications are delayed. Fetch mode is totall…

I mean, my point with E-mail is to say it already IS a solved problem.

Many services and apps use E-Mail so there is no need to setup additional infrastructure unlike push notifications. That is the complexity.

Send an email notifying me to test@example.com is more intuitive than setting up a push service.

Push notifications suffer from deliverability more frequently (regularly expiring tokens) than E-mail so much so, that when your device is offline and it gets back online, you only get the last notification. This is by design.

Having apps use fetch doesn't mean it's delayed, you can set it to a shorter duration but 5 minutes is the default.

But, it is over engineered as this is complexity that we do not need and would have a higher maintenance and setup than just using E-mail.

Re: Push Notifications for Decentralized Services

#49

I was surprised how easy it was to integrate. I'm on GrapheneOS/FDroid. I installed the ntfy app and connected it to my ntfy server. I wanted to set it up for Tusky (Mastodon app). I was confused about the lack of instructions. What do I set on Tusky? What do I set on all my Mastodon servers? It turned out there were no instructions. I was already configured for Tusky. Tusky found the ntfy app, got my ntfy server's U…

> But I think UnifiedPush or ntfy instructions should make these steps more clear (or I failed to find it), even if just to say "it's actually that easy" to save our time looking.

We are working on the documentation: https://codeberg.org/UnifiedPush/documentation/pulls/16

Re: Push Notifications for Decentralized Services

#50

In this direct to FCM model, does the application running on the untrusted user's device need to embed any sensitive credentials? What prevents someone else from impersonating my app or other users on my app?

If you are interested, you can read the specifications: https://unifiedpush.org/developers/spec/android/. The same question actually exists for firebase-messaging (Google) too (answer here: https://github.com/firebase/firebase-android-sdk/blob/cf5fe2...)
Post reply on HN