Bidirectional-streams Over Synchronous HTTP (BOSH) is a
transport protocol
Transport (in British English), or transportation (in American English), is the intentional movement of humans, animals, and goods from one location to another. Modes of transport include air, land ( rail and road), water, cable, pipelin ...
that emulates a bidirectional stream between two entities (such as
a client and a server) by using multiple
synchronous
Synchronization is the coordination of events to operate a system in unison. For example, the conductor of an orchestra keeps the orchestra synchronized or ''in time''. Systems that operate with all parts in synchrony are said to be synchronou ...
HTTP
The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
request/response pairs without requiring the use of
polling
Poll, polled, or polling may refer to:
Figurative head counts
* Poll, a formal election
** Election verification exit poll, a survey taken to verify election counts
** Polling, voting to make decisions or determine opinions
** Polling places o ...
or
asynchronous
Asynchrony is the state of not being in synchronization.
Asynchrony or asynchronous may refer to:
Electronics and computing
* Asynchrony (computer programming), the occurrence of events independent of the main program flow, and ways to deal wit ...
chunking.
For applications that require both "push" and "pull" communications, BOSH is significantly more bandwidth-efficient and responsive than most other bidirectional HTTP-based transport protocols and
AJAX
Ajax may refer to:
Greek mythology and tragedy
* Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea
* Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris
* ''Ajax'' (play), by the ancient Gree ...
. BOSH achieves this by avoiding HTTP polling, yet it does so without resorting to chunked HTTP responses as is done in the technique known as
Comet
A comet is an icy, small Solar System body that, when passing close to the Sun, warms and begins to release gases, a process that is called outgassing. This produces a visible atmosphere or Coma (cometary), coma, and sometimes also a Comet ta ...
. To date, BOSH has been used mainly as a transport for traffic exchanged between
Jabber/XMPP clients and servers (e.g., to facilitate connections from web clients and from mobile clients on intermittent networks).
For "push", a BOSH client starts an HTTP request, but the server postpones sending a reply until it has data to send.
XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH)
/ref> After receiving a reply, the client immediately makes another request on the same HTTP connection, so the server can always send data to the client without waiting for the client to poll. If, while waiting for a reply, the client needs to send data to the server, it opens a second HTTP connection. There are at most two HTTP connections open at a time, one on which the server can send data as a reply and one on which the client can send data as a POST.
"Bidirectional-streams Over Synchronous HTTP (BOSH)" and "XMPP over BOSH" are stable standards of the XMPP Standards Foundation
XMPP Standards Foundation (XSF) is the foundation in charge of the standardization of the protocol extensions of XMPP, the open standard of instant messaging and presence of the IETF.
History
The XSF was originally called the Jabber Softwa ...
.
The second related standard XMPP Over BOSH (XEP-0206) defines how BOSH may be used to transport XMPP
Extensible Messaging and Presence Protocol (XMPP, originally named Jabber) is an open communication protocol designed for instant messaging (IM), presence information, and contact list maintenance. Based on XML (Extensible Markup Language), ...
stanzas. The result is an HTTP binding for XMPP communications that is intended to be used in situations where a device or client is unable to maintain a long-lived TCP connection
TCP may refer to:
Science and technology
* Transformer coupled plasma
* Tool Center Point, see Robot end effector
Computing
* Transmission Control Protocol, a fundamental Internet standard
* Telephony control protocol, a Bluetooth communication ...
to an XMPP server.
See also
* Push technology
Push technology or server push is a style of Internet-based communication where the request for a given transaction is initiated by the publisher or central server. It is contrasted with pull/get, where the request for the transmission of inform ...
* WebSocket
WebSocket is a computer communications protocol, providing full-duplex communication channels over a single Transmission Control Protocol, TCP connection. The WebSocket protocol was standardized by the Internet Engineering Task Force, IETF as in ...
Notes
References
XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH)
BOSH overview
Web 2.0 neologisms
XMPP
Hypertext Transfer Protocol
{{compu-network-stub