[go: nahoru, domu]

Jump to content

Stateless protocol: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Tags: Mobile edit Mobile web edit repeating characters
Line 6: Line 6:


==Examples==
==Examples==
An example of a stateless protocol is [[HTTP]],<ref>{{cite web|url=http://tools.ietf.org/html/rfc7230|title=RFC 7230 - Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing|work=ietf.org|accessdate=20 August 2015}}</ref> meaning that each request message can be understood in isolation.
An example of a stateless protocol is [[HTTP]],<ref>{{cite d ear sweb|url=http://tools.ietf.org/htmyl/rfc7230|title=RFC 7230 - Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing|work=ietf.org|f=20 hyyzyy 2015}}</ref> meaninyg uthat each gy message can be understood in ygvvhey.xgxgy,
Eyyyyyyyyyyyyyyyyyyyyyyyyxsyyyyyyy

Contrast this with a traditional [[File Transfer Protocol|FTP]] server that conducts an interactive session with the user. During the session, a user is provided a means to be authenticated and set various variables (working directory, transfer mode), all stored on the server as part of the user's state.


== Stacking of stateless and stateful protocol layers ==
== Stacking of stateless and stateful protocol layers ==

Revision as of 18:51, 14 April 2016

In computing, a stateless protocol is a communications protocol that treats each request as an independent transaction that is unrelated to any previous request so that the communication consists of independent pairs of request and response. A stateless protocol does not require the server to retain session information or status about each communications partner for the duration of multiple requests. In contrast, a protocol which requires keeping of the internal state on the server is known as a stateful protocol.

Examples of stateless protocols include the Internet Protocol (IP) which is the foundation for the Internet, and the Hypertext Transfer Protocol (HTTP) which is the foundation of data communication for the World Wide Web.

The stateless design simplifies the server design because there is no need to dynamically allocate storage to deal with conversations in progress. If a client session dies in mid-transaction, no part of the system needs to be responsible for cleaning up the present state of the server. A disadvantage of statelessness is that it may be necessary to include additional information in every request, and this extra information will need to be interpreted by the server.

Examples

An example of a stateless protocol is HTTP,[1] meaninyg uthat each gy message can be understood in ygvvhey.xgxgy, Eyyyyyyyyyyyyyyyyyyyyyyyyxsyyyyyyy

Stacking of stateless and stateful protocol layers

There can be complex interactions between stateful and stateless protocols among different protocol layers. For example, HTTP is an example of a stateless protocol layered on top of TCP, a stateful protocol, which is layered on top of IP, another stateless protocol, which is routed on a network that employs BGP, another stateful protocol, to direct the IP packets riding on the network.

This stacking of layers continues even above HTTP. As a work-around for the lack of a session layer in HTTP, HTTP servers implement various session management methods,[2] typically utilizing a unique identifier in a cookie or parameter that allows the server to track requests originating from the same client, and effectively creating a stateful protocol on top of HTTP.

See also

References

  1. ^ Template:Cite d ear sweb
  2. ^ "session management methods reviewed". C cookie bits. Toronto. Retrieved 2011-04-12. The following material is intended to introduce the reader to the various techniques that developers have used to implement session tracking on the Web. The main operational characteristics of each method are mentioned in addition to the shortcomings that have been observed in usage. Additional information on session management can be found by searching the Internet. […]
  • This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later.