{"id":1260,"date":"2021-03-09T08:31:41","date_gmt":"2021-03-09T08:31:41","guid":{"rendered":"https:\/\/blog.amt.in\/?p=1260"},"modified":"2021-03-09T08:31:58","modified_gmt":"2021-03-09T08:31:58","slug":"introduction-to-push-technology","status":"publish","type":"post","link":"https:\/\/blog.amt.in\/index.php\/2021\/03\/09\/introduction-to-push-technology\/","title":{"rendered":"Introduction to Push Technology"},"content":{"rendered":"<p>Push technology, or\u00c2\u00a0server push, is a style of\u00c2\u00a0Internet-based communication where the request for a given transaction is initiated by the publisher or central\u00c2\u00a0server. It is contrasted with\u00c2\u00a0pull\/get, where the request for the transmission of information is initiated by the receiver or\u00c2\u00a0client.<\/p>\n<p>Push services are often based on information preferences expressed in advance. This is called a\u00c2\u00a0publish\/subscribe\u00c2\u00a0model. A client &#8220;subscribes&#8221; to various information &#8220;channels&#8221; provided by a server; whenever new content is available on one of those channels, the server pushes that information out to the client.<\/p>\n<p>Push is sometimes emulated with a\u00c2\u00a0polling\u00c2\u00a0technique, particularly under circumstances where a real push is not possible, such as sites with security policies that require rejection of incoming HTTP\/S requests.<\/p>\n<p>Synchronous conferencing\u00c2\u00a0and\u00c2\u00a0instant messaging\u00c2\u00a0are typical examples of push services. Chat messages and sometimes\u00c2\u00a0files\u00c2\u00a0are pushed to the user as soon as they are received by the messaging service. Both decentralised\u00c2\u00a0peer-to-peer\u00c2\u00a0programs (such as\u00c2\u00a0WASTE) and centralised programs (such as\u00c2\u00a0IRC\u00c2\u00a0or\u00c2\u00a0XMPP) allow pushing files, which means the sender initiates the data transfer rather than the recipient.<\/p>\n<p>Email\u00c2\u00a0may also be a push system:\u00c2\u00a0SMTP\u00c2\u00a0is a push protocol (see\u00c2\u00a0Push e-mail). However, the last step\u00e2\u20ac\u201dfrom mail server to desktop computer\u00e2\u20ac\u201dtypically uses a pull protocol like\u00c2\u00a0POP3\u00c2\u00a0or\u00c2\u00a0IMAP. Modern e-mail clients make this step seem instantaneous by repeatedly\u00c2\u00a0polling\u00c2\u00a0the mail server, frequently checking it for new mail. The IMAP protocol includes the\u00c2\u00a0IDLE\u00c2\u00a0command, which allows the server to tell the client when new messages arrive. The original\u00c2\u00a0BlackBerry\u00c2\u00a0was the first popular example of push-email in a wireless context.<\/p>\n<p>Another example is the\u00c2\u00a0PointCast Network, which was widely covered in the 1990s. It delivered news and stock market data as a screensaver. Both\u00c2\u00a0Netscape\u00c2\u00a0and\u00c2\u00a0Microsoft\u00c2\u00a0integrated push technology through the\u00c2\u00a0Channel Definition Format\u00c2\u00a0(CDF) into their software at the height of the\u00c2\u00a0browser wars, but it was never very popular. CDF faded away and was removed from the browsers of the time, replaced in the 2000s with\u00c2\u00a0RSS\u00c2\u00a0(a pull system.)<\/p>\n<p>Other uses of push-enabled\u00c2\u00a0web applications\u00c2\u00a0include software updates distribution (&#8220;push updates&#8221;), market data distribution (stock tickers), online chat\/messaging systems (webchat), auctions, online betting and gaming, sport results, monitoring consoles, and\u00c2\u00a0sensor network\u00c2\u00a0monitoring.<\/p>\n<h3><span id=\"Webpush\" class=\"mw-headline\">Webpush<\/span><\/h3>\n<p>The Webpush proposal of the\u00c2\u00a0Internet Engineering Task Force\u00c2\u00a0is a simple protocol using\u00c2\u00a0HTTP version 2\u00c2\u00a0to deliver realtime events, such as incoming calls or messages, which can be delivered (or \u00e2\u20ac\u0153pushed\u00e2\u20ac\u009d) in a timely fashion. The protocol consolidates all\u00c2\u00a0real-time\u00c2\u00a0events into a single session which ensures more efficient use of network and radio resources. A single service consolidates all events, distributing those events to applications as they arrive. This requires just one session, avoiding duplicated overhead costs.<\/p>\n<p>Web Notifications are part of\u00c2\u00a0W3C\u00c2\u00a0standard and defines an\u00c2\u00a0API\u00c2\u00a0for end-user notifications. A notification allows alerting the user outside the context of a web page of an occurrence, such as the delivery of email.\u00c2\u00a0As part of this standard Push API defined by W3C, is now being implemented by Chrome, Firefox,\u00c2\u00a0Edge, and Safari.<\/p>\n<h3><span id=\"HTTP_server_push\" class=\"mw-headline\">HTTP server push<\/span><\/h3>\n<p>HTTP server push (also known as HTTP streaming) is a mechanism for sending unsolicited (asynchronous) data from a\u00c2\u00a0web server\u00c2\u00a0to a\u00c2\u00a0web browser. HTTP server push can be achieved through any of several mechanisms.<\/p>\n<p>As a part of HTML5 the\u00c2\u00a0WebSocket\u00c2\u00a0API allows a web server and client to communicate over a\u00c2\u00a0full-duplex\u00c2\u00a0TCP connection.<\/p>\n<p>Generally the web server does not terminate a connection after response data has been served to a client. The web server leaves the connection open so that if an event occurs (for example, a change in internal data which needs to be reported to one or multiple clients), it can be sent out immediately; otherwise, the event would have to be queued until the client&#8217;s next request is received. Most web servers offer this functionality via\u00c2\u00a0CGI\u00c2\u00a0(e.g., Non-Parsed Headers scripts on\u00c2\u00a0Apache HTTP Server). The underlying mechanism for this approach is\u00c2\u00a0chunked transfer encoding.<\/p>\n<p>Another mechanism is related to a special\u00c2\u00a0MIME\u00c2\u00a0type called\u00c2\u00a0<code>multipart\/x-mixed-replace<\/code>, which was introduced by\u00c2\u00a0Netscape\u00c2\u00a0in 1995. Web browsers interpret this as a document that changes whenever the server pushes a new version to the client.\u00c2\u00a0It is still supported by\u00c2\u00a0Firefox,\u00c2\u00a0Opera, and\u00c2\u00a0Safari\u00c2\u00a0today, but it is ignored by\u00c2\u00a0Internet Explorer\u00c2\u00a0and is only partially supported by\u00c2\u00a0Google Chrome.\u00c2\u00a0It can be applied to\u00c2\u00a0HTML\u00c2\u00a0documents, and also for streaming images in\u00c2\u00a0webcam\u00c2\u00a0applications.<\/p>\n<p>The\u00c2\u00a0WHATWG\u00c2\u00a0Web Applications 1.0 proposal\u00c2\u00a0includes a mechanism to push content to the client. On September 1, 2006, the Opera web browser implemented this new experimental system in a feature called &#8220;Server-Sent Events&#8221;.\u00c2\u00a0It is now being standardized as part of\u00c2\u00a0HTML5.<\/p>\n<h3><span id=\"Pushlet\" class=\"mw-headline\">Pushlet<\/span><\/h3>\n<p>In this technique, the server takes advantage of\u00c2\u00a0persistent HTTP connections, leaving the response perpetually &#8220;open&#8221; (i.e., the server never terminates the response), effectively fooling the browser to remain in &#8220;loading&#8221; mode after the initial page load could be considered complete. The server then periodically sends snippets of JavaScript to update the content of the page, thereby achieving push capability. By using this technique, the client doesn&#8217;t need\u00c2\u00a0Java applets\u00c2\u00a0or other plug-ins in order to keep an open connection to the server; the client is automatically notified about new events, pushed by the server.\u00c2\u00a0One serious drawback to this method, however, is the lack of control the server has over the browser timing out; a page refresh is always necessary if a timeout occurs on the browser end.<\/p>\n<h3><span id=\"Long_polling\" class=\"mw-headline\">Long polling<\/span><\/h3>\n<p>Long polling is itself not a true push; long polling is a variation of the traditional\u00c2\u00a0polling\u00c2\u00a0technique, but it allows emulating a push mechanism under circumstances where a real push is not possible, such as sites with security policies that require rejection of incoming HTTP\/S Requests.<\/p>\n<p>With long polling, the client requests information from the server exactly as in normal polling, but with the expectation the server may not respond immediately. If the server has no new information for the client when the poll is received, instead of sending an empty response, the server holds the request open and waits for response information to become available. Once it does have new information, the server immediately sends an HTTP\/S response to the client, completing the open HTTP\/S Request. Upon receipt of the server response, the client often immediately issues another server request. In this way the usual response latency (the time between when the information first becomes available at the next client request) otherwise associated with polling clients is eliminated.<\/p>\n<p>For example,\u00c2\u00a0\u00c2\u00a0is a popular, long-lived HTTP technique used as a long-polling alternative to a continuous TCP connection when such a connection is difficult or impossible to employ directly (e.g., in a web browser);\u00c2\u00a0it is also an underlying technology in the\u00c2\u00a0XMPP, which Apple uses for its iCloud push support.<\/p>\n<p>The above is a brief about Push Technology. Watch this space for more updates on the latest Trends in Technology.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Push technology, or\u00c2\u00a0server push, is<\/p>\n","protected":false},"author":1,"featured_media":1262,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[762,761,763],"tags":[765,766,764],"class_list":["post-1260","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-internet-based-communication","category-push-technology","category-server","tag-internet-based-communication","tag-push-technology","tag-server"],"_links":{"self":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts\/1260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/comments?post=1260"}],"version-history":[{"count":1,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts\/1260\/revisions"}],"predecessor-version":[{"id":1261,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts\/1260\/revisions\/1261"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/media\/1262"}],"wp:attachment":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/media?parent=1260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/categories?post=1260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/tags?post=1260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}