

Ask HN: Technology behind Push Notification - kusum18

Hi Guys,<p>I hope this is not a repeated post. I would like to know the exact idea/technology behind developing a push server.<p>The exact query i have is technology wise whats the exact implementation difference between push server and polling client ?
======
aleprok
Push server requires constant connection with the client and the server pushes
new information to clients without requiring the client to first ask for
updates. Polling requires the client to ask for updates, but does not require
constant connection. The connection with polling server is required only while
the poll is happening.

Push server basically does not require much at all download bandwith, when
polling requires bandwith for each update request. But push server requires
open connection per active client, which might be in the millions at the same
time. Pull server does not need active connections to be open all the time.
Only when a request happens. For example web servers use pull method to
service more clients with less cpu and memory usage because the connections
are actually only open when http request/reply happens. Games and chats use
push method to move information to the server and to push information given by
another client to other clients. But for the server to push data to clients
the server at least needs to have the ip address of the client with udp or
open socket with tcp.

------
keyle
The best is to have a read of Wikipedia's article.

<http://en.wikipedia.org/wiki/Push_technology>

Basically clients subscribe to channels they want to be kept up to date with
and they get notified of changes.

They're being "pushed" information.

Behind the myriad of complex implementations, it's very simple.

Have a service allowing subscriptions and removals, a channel system (handling
multiple lists of clients) - although not necessarily - and the server a
method to push the info out to the clients.

From there it's all about getting smarter about data... Throttling data,
chunking client lists, periodically testing if clients are still alive, etc.
But overall, simple.

------
dous
"push" requires that an open connection be maintained, while "poll" means you
connect multiple times.

------
kusum18
Thanks a lot everyone.

