I use KDE Connect already, but the Android app -also- sucks. Sometimes I get a message on the Desktop app and five minutes later long after I read it the Android one finally sends me a notification.
Conversation
I'm used to the non-GCM push implementation on devices without Google Play which works essentially the same way as the desktop app. GCM is efficient but it's not particularly reliable and often has delays. The efficiency is mostly from apps reusing the same connection anyway.
3
1
I don't see any fundamental reason GCM should be more efficient than a properly written application sleeping in a poll or a thread making a blocking read from the notification socket. It's more a matter of apps being idiotic or maliciously doing other stuff in the background.
1
The reason it's more efficient is that it's a single connection with highly optimized rare polling based on a good heuristics for tuning the frequency of the polling. If the apps all use the same polling interval and coordinate it with flexible alarms it wouldn't be that bad.
2
poll does not have a frequency of polling unless you misuse it by passing a timeout. It sleeps until there's data.
1
The issue is that connections often break in practice without notifying you, so you need to regularly wake up and send some data both to keep the connection from being killed and to make sure that it hasn't died yet. It's particularly bad with most mobile data connections.
2
poll should return with an exceptional condition if the socket dies. If it doesn't this is a problem the OS should solve; it's trivial to do if you can see the connection go down/up again.
1
1
Connections die pretty quickly if you aren't sending anything through them on mobile networks and you don't receive reliable notice of that. OS doesn't know about it either and the device is generally asleep when this happens. Need to decide how often to wake to keep them going.
2
Is this NAT-hell only? In principle it shouldn't happen on a real IPv6 network, which we'll hopefully be able to assume in a few years...
1
An IPv6 network without stateful firewalls shouldn't have this issue, but stateful firewalls will still end up dropping old / inactive connections. There's also just a whole lot of broken stuff. I think there are a lot of pure IPv6 mobile networks already and it still happens.
2
It's why the checking needs to be tuned, unlike Signal's naive implementation. It should be expanding the time it waits before checking and recording basic statistics to tune the rate for the connection. For some connections, maybe it's perfectly sane to wait a very long time.
It's also totally possible that GCM is using hardware offloading for this. I'm not sure. I don't think it's available to regular applications though.


