Hacker News new | ask | show | jobs
by Andrew_nenakhov 2337 days ago
Well, not really fine. You should trust me in this, because our Android xmpp app is closing on 2 million installations on Google Play. There are a lot of problems maintaining a persistent connection, and Google makes it harder with each new version of Android. And if we go for push notifications, without persistent connection, the problems are the same as with iOS.

To counter this and make XMPP work well on mobile and in browsers, we had to develop our own server and a bunch of new protocol extensions.

1 comments

I believe there are problems, and a million thanks for maintaining clients.

Real question: for email, I use K9, which supports IMAP Push, which, as far as I know, needs a live connection as well. Do you know if they are struggling as well, or is the xmpp push and imap push significantly different in some way?

Mobile OS pushes on both iOS (APNS) and Android (FCM) work the same: push can only be initiated by the developers of an application. So, no third-party server can push an app without intermediation by the application developers. Scheme is this:

Service -> Push service -> APNS / FCM -> Applications

With XMPP, servers act as 'service' from the scheme above, then relay a push initiation to 'Push service', maintained by a client app developers, Push service relays information to a respective service by Apple / Google, who deliver push to an Application, which connects to Service (or does not, pushes can contain all necessary information for displaying in notification, but that's a story for another time).

With email, I'm not really familiar with how IMAP Push works, but the scheme must be the same: an email server must relay info to a push service maintained by app developers, in your case, K9 guys.

From what I was able to gather after reading wikipedia for 5 min, an IMAP server upon receiving an email sends info to some 'mail user agent'. From wikipedia it's not really clear, but it appears that is is supposed to work on end devices. In this case, it won't really work as 'push'.

Google (or any other email provider, like Protonmail, who have their own app) get around this because they control both email server and push server, so it's trivial for them to initiate a push when an email is received.