Reverse Ajax refers to an
AjaxAJAX is a group of interrelated web development techniques used on the client-side to create interactive web applications. With AJAX, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page...
design patternA design pattern in architecture and computer science is a formal way of documenting a solution to a design problem in a particular field of expertise. The idea was introduced by the architect Christopher Alexander in the field of architecture and has been adapted for various other disciplines,...
that uses long-lived HTTP connections to enable
low-latencyLatency is a measure of time delay experienced in a system, the precise definition of which depends on the system and the time being measured.-Packet-switched networks:...
communication between a
web serverThe term web server or webserver can mean one of two things:# A computer program that is responsible for accepting HTTP requests from clients , and serving them HTTP responses along with optional data contents, which usually are web pages such as HTML documents and linked objects .# A computer that...
and a
browserA web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...
. Basically it is a way of sending data from client to server and a mechanism for pushing server data back to the browser.
This server–client communication takes one of two forms:
- Client polling
Polling, or polled operation, in computer science, refers to actively sampling the status of an external device by a client program as a synchronous activity. Polling is most often used in terms of input/output , and is also referred to as polled I/O or software driven I/O.Polling is sometimes used...
, the client repetitively queries (polls) the server and waits for an answer.
- Server pushing
Push technology, or server push, describes a style of Internet-based communication where the request for a given transaction is initiated by the publisher or central server...
, a connection between a server and client is kept open, the server sends data when available.
Reverse Ajax describes the implementation of either of these models, or a combination of both.
Discussion
Ask a question about 'Reverse Ajax'
Start a new discussion about 'Reverse Ajax'
Answer questions from other users
|
Reverse Ajax refers to an
AjaxAJAX is a group of interrelated web development techniques used on the client-side to create interactive web applications. With AJAX, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page...
design patternA design pattern in architecture and computer science is a formal way of documenting a solution to a design problem in a particular field of expertise. The idea was introduced by the architect Christopher Alexander in the field of architecture and has been adapted for various other disciplines,...
that uses long-lived HTTP connections to enable
low-latencyLatency is a measure of time delay experienced in a system, the precise definition of which depends on the system and the time being measured.-Packet-switched networks:...
communication between a
web serverThe term web server or webserver can mean one of two things:# A computer program that is responsible for accepting HTTP requests from clients , and serving them HTTP responses along with optional data contents, which usually are web pages such as HTML documents and linked objects .# A computer that...
and a
browserA web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...
. Basically it is a way of sending data from client to server and a mechanism for pushing server data back to the browser.
This server–client communication takes one of two forms:
- Client polling
Polling, or polled operation, in computer science, refers to actively sampling the status of an external device by a client program as a synchronous activity. Polling is most often used in terms of input/output , and is also referred to as polled I/O or software driven I/O.Polling is sometimes used...
, the client repetitively queries (polls) the server and waits for an answer.
- Server pushing
Push technology, or server push, describes a style of Internet-based communication where the request for a given transaction is initiated by the publisher or central server...
, a connection between a server and client is kept open, the server sends data when available.
Reverse Ajax describes the implementation of either of these models, or a combination of both. The design pattern is also known as
Ajax Push,
Full Duplex Ajax and
Streaming Ajax.
Examples
The following is a simple example. Imagine we have 2 clients and 1 server, and client1 wants to send the message "hello" to every other client.
With traditional Ajax (polling):
- client1 sends the message "hello"
- server receives the message "hello"
- client2 polls the server
- client2 receives the message "hello"
- client1 polls the server
- client1 receives the message "hello"
With reverse Ajax (pushing):
- client1 sends the message "hello"
- server receives the message "hello"
- server sends the message "hello" to all clients
Less traffic is generated with Reverse Ajax and messages are transferred with less delay (
low-latencyLatency is a measure of time delay experienced in a system, the precise definition of which depends on the system and the time being measured.-Packet-switched networks:...
).
See also
- Ajax
AJAX is a group of interrelated web development techniques used on the client-side to create interactive web applications. With AJAX, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page...
- BOSH
Bidirectional-streams Over Synchronous HTTP is a transport protocol that emulates a bidirectional stream between two entities by using multiple synchronous HTTP request/response pairs without requiring the use of polling or asynchronous chunking.It is a draft standard of the XMPP Standards...
- Comet
In web development, Comet is a neologism to describe a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it. Comet is an umbrella term for multiple techniques for achieving this interaction...
- Icefaces
ICEfaces is an open source Ajax framework that enables Java EE application developers to create and deploy server-based rich Internet application using the Java language....
- Push technology
Push technology, or server push, describes a style of Internet-based communication where the request for a given transaction is initiated by the publisher or central server...
- Pull technology
Pull technology or client pull is a style of network communication where the initial request for data originates from the client, and then is responded to by the server. The reverse is known as push technology, where the server pushes data to clients....
External links