Push Versus Pull
For about as long as the Web has been around, there have been two main ways of getting content to a user: push and pull. Pull is the method in which most interactions have worked—the user clicks a link and the browser pulls the content down from the server. If the server wants to send additional messages to the user after the data has been pulled down, it just waits and queues them up until the client makes another request. The idea behind push technology is that as soon as the server has a new message for the user, it sends it to him immediately. A connection is maintained between the server and the client and new data is sent as needed.
In the scheme of the Internet, push technology is not a new development. Throughout the years there have been different standards dictating how it should work. Each proposed standard has had varying levels of support amongst browser makers and different requirements on the server side.
The differing behaviors and requirements of the two technologies have led many developers to use one or the other. This has meant that many sites wanting to offer dynamic updates to their users had to resort to Ajax timers polling the site every X seconds to check for new content. This increased amount of requests is taxing on the server and provides a far less graceful user experience than it should have.
Pushing content out to the user as it happens gives the user a much more engaging experience and uses far less resources on the server. Fewer requests ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access