internet

@ponnamma (150)
India
March 15, 2007 9:50am CST
what is this 2 tier architecture?
1 response
@tintusam (1168)
• India
15 Mar 07
This model involves only a client and server, All communication takes place between the client on the internet and the target server at the other end. Other computers are involved in the process of transporting packets of information across the internet. A two tier architecture is one in which only a client (tier 1) and a server(tier 2) are involved in the request and responses that flow between them over the internet When a server recognize a client request it establishes a temporary connection with the client. Once the server sends the message back the connection between them is broken. A typical request message from a client to a server consists of 3 major parts 1) A request line 2) Optional request header 3) Optional entity body The request contains the command, the name of the target resource (with out the protocol or domain name), and the protocol name and version. Following the request line are name/value pairs that comprise the request header, if it exists. The request header contains additional information about the client and more information about the request. The optional entity body is sometimes used to pass bulk of information to the server; a blank line separates the entity body from the header information. Eg-: GET/whatsnew/rfc/rfc1939.html HTTP/1.0 – request line Accept: text/html – request header 1 Accept: audio/x - request header 2 The GET command asks the server to retrieve a file. Following the command is the path and filename of the needed file.”HTTP/1.0” at the end of the request indicates the client is using version 1 of the hypertext protocol. Message lines 2 and 3 indicate that the client accepts text in HTML format and accepts a specific audio format. Once the request is received by the server it executes the command, retrieves a particular web page from it trove of pages and then formulates a properly formulated response to send back to the requesting client. A server’s response consists of three parts that are identical in structure to a request message: a response header line, one or more response header fields and an optional entity body. The response header line indicates the HTTP version used by the server, the status of the response and an explanation of status information. Following the response header line is the response header field, which returns information describing the servers attributes. The entity body returns the HTML page requested by the client machine.