13

When I receive a notification on my phone, how was the push server able to communicate with the device?

Is there a constant connection between client and server? As far as I know something like WebSockets will put a huge load on the server side with all these devices.

Is it some kind of polling mechanism by the client? Seems still like a huge load of requests.

Does the client keep the server up to date with his IP address? How comes no firewall blocks this request (like the one of the router when using Wifi)?

Thanks!

Chris
  • 1,008
  • 2
  • 11
  • 22

1 Answers1

-2

Push notification for iOS and Android are services from Apple (APN) and Google (Cloud Messaging) respectively. For example for APN, the server sends the message to Apple's APN server, including a token that identifies the device. In fact the token is unique for your app running on a device. Obviously the channel is secure and your server need credentials (certificate).

Gabriel
  • 3,319
  • 1
  • 16
  • 21
  • 3
    Yes, but how does the server communicate with the client? – Chris Jan 26 '17 at 19:15
  • 1
    @Chris ah, now I understand your question. And I think it is duplicated. http://stackoverflow.com/questions/17262511/how-do-ios-push-notifications-work – Gabriel Jan 30 '17 at 18:30