How do push notifications work from a networking point of view? [closed]

Solution 1:

I unfortunately only know the answer to the second part of your question.

APNS (Apple Push Notification Service) uses XMPP (eXtensible Messaging and Presence Protocol). XMPP is commonly known as the Jabber IM protocol that also powers Google Talk. XMPP uses TCP port 5223.

The device (client) makes a connection to the APNS servers on port 5223. Thereafter, the server can send an XMPP message back to the client, which will in turn notify the subscribing application.

Solution 2:

WiFi networks use "beacons" to allow clients to enter power-saving mode, but still be notified regularly if there is any traffic waiting to be sent to them.

Before entering power-saving mode, a WiFi device checks how often beacons are sent from the AP (typically, every 100ms, so ten per second, but some APs will let you vary it) and then wakes up in time to receive it. This beacon tells the client if there is any traffic waiting to be sent to it. Thus, it can still spend most of it's time powered down, but occasionally wake up to see if there's any real work to do. If there isn't, it immediately goes back to sleep again. And therein lies the powersavng.

Good page on it here: http://www.wi-fiplanet.com/tutorials/article.php/1492071/