I'm asking more about what "Push notifications via Google Cloud Messaging" are and why they are unavoidable. I think I will be able to infer what minimal identifying data is required from that.
You can probably find a more accurate description somewhere else, but here is a TL;DR version:
In order to receive notifications without a push notification service like Google Cloud Messaging (GCM), every app would have to
a) poll for updates, meaning that the app establishes a connection repeatedly and asks a server for update. In the worst case, there is a delivery delay as big as the period between two polls. That also means that the app has to be running and thus the phone "awake" every time an app tries to get updates
or
b) keep a connection to the server open. That also requires that the app is running and sending something like keep-alive commands to avoid timeouts
In both cases it means that it doesn't scale at all. The phone would be awake a lot just to fetch updates, it would drain the battery and cause unnecessary much network traffic. Unnecessary, since there is a better solution: register with a 3rd-party service that handles the updates instead, in the case of Android mostly GCM. It basically works as follows: GCM keeps one connection to the Google servers open the whole time. Apps on the phone can register with the GCM client. Instead of sending the updates directly to the app on the phone, the app backends send the data to google instead, which then sends it with very little delay and overhead to the GCM client on the phone, which then in turn wakes up the respective app and passes the payload data.
If all these services just use GCM instead of handling notifications on their own, using WhatsApp, FB Messenger, Telegram, Signal, Skype, WeChat, Line and Viber at the same time is suddenly not such a bad idea anymore.
GCM it often unavoidable, since very little apps support alternatives to it. E.g. in China several alternatives exist, since connections to Google are blocked. I think also Amazon runs its own push notifications service.
I bet it's not TL;DR. :) Because if I asked something and got a reply, not reading it would be disrespectful to the author, no matter how long the reply is.
> In order to receive notifications
Your answer would be absolutely perfect if you added "from a remote server". I was slightly confused, wondering what kind of notifications an app is supposed to receive.
Thanks for answering. Your answer is great.
Also, now I'm curious how they do it while sending only minimal identifying data. I was wrong thinking that it would be immediately clear. I wonder if TheCoreh is correct about proxying.
Oh, and you don't need to answer if you don't want to. I can do my own research.
Google offers a push notification system like Apple's, with centralized servers, to efficiently deliver notifications to all users without having apps constantly running in the background killing battery life.
It is unavoidable, I assume, because otherwise you won't get notifications, which defeats the purpose of several apps, and they can't provide a fully independent alternative server because it would require integration on each app developer's backend side. "Sending minimal information", probably means they proxy the requests to avoid giving geoip info to Google about you.
In order to receive notifications without a push notification service like Google Cloud Messaging (GCM), every app would have to
a) poll for updates, meaning that the app establishes a connection repeatedly and asks a server for update. In the worst case, there is a delivery delay as big as the period between two polls. That also means that the app has to be running and thus the phone "awake" every time an app tries to get updates
or
b) keep a connection to the server open. That also requires that the app is running and sending something like keep-alive commands to avoid timeouts
In both cases it means that it doesn't scale at all. The phone would be awake a lot just to fetch updates, it would drain the battery and cause unnecessary much network traffic. Unnecessary, since there is a better solution: register with a 3rd-party service that handles the updates instead, in the case of Android mostly GCM. It basically works as follows: GCM keeps one connection to the Google servers open the whole time. Apps on the phone can register with the GCM client. Instead of sending the updates directly to the app on the phone, the app backends send the data to google instead, which then sends it with very little delay and overhead to the GCM client on the phone, which then in turn wakes up the respective app and passes the payload data.
If all these services just use GCM instead of handling notifications on their own, using WhatsApp, FB Messenger, Telegram, Signal, Skype, WeChat, Line and Viber at the same time is suddenly not such a bad idea anymore.
GCM it often unavoidable, since very little apps support alternatives to it. E.g. in China several alternatives exist, since connections to Google are blocked. I think also Amazon runs its own push notifications service.