Push technology, also known asserver push, is a communication method where the communication is initiated by aserver rather than aclient. This approach is different from the "pull" method where the communication is initiated by a client.[1]
In push technology, clients can express their preferences for certain types of information or data, typically through a process known as thepublish–subscribe model. In this model, a client "subscribes" to specific information channels hosted by a server. When new content becomes available on these channels, the server automatically sends, or "pushes," this information to the subscribed client.
Under certain conditions, such as restrictive security policies that block incomingHTTP requests, push technology is sometimes simulated using a technique calledpolling. In these cases, the client periodically checks with the server to see if new information is available, rather than receiving automatic updates.
Synchronous conferencing andinstant messaging are examples of push services. Chat messages and sometimesfiles are pushed to the user as soon as they are received by the messaging service. Both decentralizedpeer-to-peer programs (such asWASTE) and centralized programs (such asIRC orXMPP) allow pushing files, which means the sender initiates the data transfer rather than the recipient.
Email may also be a push system:SMTP is a push protocol (seePush e-mail). However, the last step—from mail server to desktop computer—typically uses a pull protocol likePOP3 orIMAP. Modern e-mail clients make this step seem instantaneous by repeatedlypolling the mail server, frequently checking it for new mail. The IMAP protocol includes theIDLE command, which allows the server to tell the client when new messages arrive. The originalBlackBerry was the first popular example of push-email in a wireless context.[citation needed]
Another example is thePointCast Network, which was widely covered in the 1990s. It delivered news and stock market data as a screensaver. BothNetscape andMicrosoft integrated push technology through theChannel Definition Format (CDF) into their software at the height of thebrowser wars, but it was never very popular. CDF faded away and was removed from the browsers of the time, replaced in the 2000s withRSS (a pull system.)
Other uses of push-enabledweb applications include software updates distribution ("push updates"), market data distribution (stock tickers), online chat/messaging systems (webchat), auctions, online betting and gaming, sport results, monitoring consoles, andsensor network monitoring.
The Web push proposal of theInternet Engineering Task Force is a simple protocol usingHTTP version 2 to deliver real-time events, such as incoming calls or messages, which can be delivered (or "pushed") in a timely fashion. The protocol consolidates allreal-time events 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.[2]
Web Notifications are part of theW3C standard and define anAPI for end-user notifications. A notification allows alerting the user of an event, such as the delivery of an email, outside the context of a web page.[3] As part of this standard, Push API is fully implemented inChrome,Firefox, andEdge, and partially implemented inSafari as of February 2023[update].[4][5]
HTTP server push (also known as HTTP streaming) is a mechanism for sending unsolicited (asynchronous) data from aweb server to aweb browser. HTTP server push can be achieved through any of several mechanisms.
As a part ofHTML5 theWeb Socket API allows a web server and client to communicate over afull-duplex TCP connection.
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's next request is received. Most web servers offer this functionality viaCGI (e.g., Non-Parsed Headers scripts onApache HTTP Server). The underlying mechanism for this approach ischunked transfer encoding.
Another mechanism is related to a specialMIME type calledmultipart/x-mixed-replace, which was introduced byNetscape in 1995. Web browsers interpret this as a document that changes whenever the server pushes a new version to the client.[6] It is still supported byFirefox,Opera, andSafari today, but it is ignored byInternet Explorer[7] and is only partially supported byChrome.[8] It can be applied toHTML documents, and also for streaming images inwebcam applications.
TheWHATWG Web Applications 1.0 proposal[9] includes 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 "Server-Sent Events".[10][11] It is now part of theHTML5 standard.[12]
In this technique, the server takes advantage ofpersistent HTTP connections, leaving the response perpetually "open" (i.e., the server never terminates the response), effectively fooling the browser to remain in "loading" mode after the initial page load could be considered complete. The server then periodically sends snippets ofJavaScript to update the content of the page, thereby achieving push capability. By using this technique, the client doesn't needJava applets or 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.[13][14] One 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.
Long polling is itself not a true push; long polling is a variation of the traditional polling technique, 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 requests.
With long polling, the client requests to get more information from the server exactly as in normal polling, but with the expectation that the server may not respond immediately. If the server has no new information for the client when the poll is received, then 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 response to the client, completing the open HTTP 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 and the next client request) otherwise associated with polling clients is eliminated.[15]
For example,BOSH is 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);[16] it is also an underlying technology in theXMPP, which Apple uses for its iCloud push support.
This technique, used bychat applications, makes use of theXML Socket object in a single-pixelAdobe Flash movie. Under the control ofJavaScript, the client establishes aTCP connection to aunidirectional relay on the server. The relay server does not read anything from thissocket; instead, it immediately sends the client aunique identifier. Next, the client makes anHTTP request to the web server, including this identifier with it. The web application can then push messages addressed to the client to a local interface of the relay server, which relays them over the Flash socket. The advantage of this approach is that it appreciates the natural read-write asymmetry that is typical of many web applications, including chat, and as a consequence it offers high efficiency. Since it does not accept data on outgoing sockets, the relay server does not need to poll outgoing TCP connectionsat all, making it possible to hold open tens of thousands of concurrent connections. In this model, the limit to scale is the TCP stack of the underlying server operating system.
In services such ascloud computing, to increase reliability and availability of data, it is usually pushed (replicated) to several machines. For example, the Hadoop Distributed File System (HDFS) makes 2 extra copies of any object stored. RGDD focuses on efficiently casting an object from one location to many while saving bandwidth by sending minimal number of copies (only one in the best case) of the object over any link across the network. For example, Datacast[17] is a scheme for delivery to many nodes inside data centers that relies on regular and structured topologies and DCCast[18] is a similar approach for delivery across data centers.
A push notification is a message that is "pushed" from a back-end server or application to a user interface, e.g. mobile applications[19] or desktop applications.Apple introduced push notifications foriPhone in 2009,[20] and in 2010Google released "Google Cloud to Device Messaging" (superseded byGoogle Cloud Messaging and then byFirebase Cloud Messaging).[21]In November 2015,Microsoft announced that theWindows Notification Service would be expanded to make use of the Universal Windows Platform architecture, allowing for push data to be sent toWindows 10,Windows 10 Mobile,Xbox, and other supported platforms using universal API calls and POST requests.[22]
Push notifications are mainly divided into two approaches, local notifications and remote notifications.[23] For local notifications, the application schedules the notification with the local device's OS. The application sets a timer in the application itself, provided it is able to continuously run in the background. When the event's scheduled time is reached, or the event's programmed condition is met, the message is displayed in the application's user interface.
Remote notifications are handled by a remote server. Under this scenario, the client application needs to be registered on the server with a unique key (e.g., aUUID). The server then fires the message against the unique key to deliver it to the client via an agreed client/server protocol such asHTTP orXMPP, and the client displays the message received. When the push notification arrives, it can transmit short notifications and messages, set badges on application icons, blink or continuously light up thenotification LED, or play alert sounds to attract user's attention.[24] Push notifications are usually used by applications to bring information to users' attention. The content of the messages can be classified in the following example categories:
Real-time push notifications may raise privacy issues since they can be used to bind virtual identities of social network pseudonyms to the real identities of the smartphone owners.[26] The use of unnecessary push notifications for promotional purposes has been criticized as an example ofattention theft.[27]