Reputation: 1073
I am trying to understand how exactly push notification services work. Are these real push services with constant connection to server or just mimics by polling? How does a server with heavy traffic maintain so many connections?
Upvotes: 2
Views: 1089
Reputation: 719
Fusio is correct. For mobile phones, a single push service is typically used (Google cloud messaging for android, Apple Push Notification Service for Apple/iPhone) to limit the amount of connections from the phone. 3rd party applications register to these services and push messages through them.
Upvotes: 1
Reputation: 3675
In general push notifications work both by establishing a long-lived TCP connection, or using long-polling. The maximum number of connected clients is determined by the server resources.
Take a look at the Socket.io protocol stack for an example. Or better yet, at the XMPP/Jabber protocol, which relies on TCP principally and falls back on long polling.
Upvotes: 3