HTTP Communication Protocol
2.2.2 HTTP Communication Protocol
Http is an object-oriented protocol that belongs to the application layer. It is simple and fast, and suitable for distributed hyper-media information system.
2 E-commerce Supporting Technologies
Proposed in 1990, now Http has evolved to the sixth edition of HTTP/1.0 after several years’ development, which is now used in www. While the standardization of HTTP/1.1 is under way, HTTP-NG (Next Generation of HTTP) has been proposed as well.
The primary features of http protocol can be outlined as follows: (1) Supporting the client/server mode. (2) Simple and fast: When the client sends a request to the server, only the method
and path are required. Commonly requested methods include GET, HEAD and POST. Each method prescribes the different types of the interconnection between client and server. Because of the simplicity of http, the http program is small, thus the speed is high.
(3) Flexible: Http allows the transport of data object of arbitrary type. The type that is being transported is marked with Content-Type.
(4) Connectionless: Connectionless means that each connection was restricted to process only one request. The server disconnects immediately after receiving the response. In this way time is saved.
(5) Stateless: Http is a stateless protocol. Stateless means that the protocol has no memory concerning business transaction. That is, if the business transaction afterwards needs previous information, it has to be resent, which means the data amount would be increased. On the other hand, when the server does not require previous information, the response would be faster.
Some important concepts in HTTP protocol: (1) Message: The basic element of http communications, including a structured
eight-element sequence.
(2) Request: A message from the client to the server, which should include the method of using resources, the resource identity and version number of protocol.
(3) Response: A message returned from the server, which includes the version number of http protocol, request state (success or unavailable) and the MIME type of document.
(4) Resource: The network data object or service marked by URI. (5) Entity: A special representation of data resource, which might be rounded
up by a request or response. An entity should include the entity head and its content.
(6) Client: An application established to send request. (7) Client proxy: The terminal that initializes requests, such as browser, editor
or other tools. (8) Server: An application that receives request and returns response. (9) Source Server: a server where resources can stay or be established. (10) Proxy: An intermediate program which acts either as a server or a client to
form request for its client.
(11) Gateway: A server that acts as the media for other servers. Different from proxy, the gateway acts as a resource server to the client sending the request. The
Introduction to E-commerce
client does not realize that it is interacting with the gateway. The gateway usually acts as the firewall server, which can also acts as a protocol interpreter to access the resources that are stored in non-http systems.
(12) Pathway: The media program between two connections. (13) Buffer: Local storage of response information. The http protocol is based on the request/response mode. Once a client gets
connection with a server, it sends a request to the server, the format of which includes URL, protocol version number, the MIME information, as well as the request modifier, client information and possible content. When the server receives the request, it will return immediately response, the format of which is a status line, including protocol version number, a success or error code, MIME information, plus server information, entity information and other possible content. Many http communications were initialized by a client proxy and include a request for the resource on the resource server as well. The simplest case might be to set up a single connection between the user agent and the source server.