Client Server Architecture and Web Protocols
Client/Server Evolution
A long time ago, client-server computing was just using mainframes and connecting to dumb terminals. Through the years, personal computers started to evolve and replaced these terminals but the processing is still processed on the mainframes. With the improvement in computer technology, the processing demands started to split between personal computers and mainframes.
The term client-server refers to a software architecture model consisting of two parts, client systems and server systems. These two components can interact and form a network that connects multiple users. Using this technology, PCs are able to communicate with each other on a network. These networks were based on file sharing architecture, where the PC downloads files from the corresponding file server and the application are running locally using the data received. However, the shared usage and the volume of data to be transferred must be low to run the system well. As the networks grew, the limitations of file sharing architectures become obstacles in the client-server system.
This problem is solved by replacing the file server with a database server. Instead of transmitting and saving the file to the client, the database server executes the request for data and returns the result sets to the client. As the result, this architecture decreases the network traffic, allowing multiple users to update data at the same time.
Typically either Structured Query Language (SQL) or Remote Procedure Calls (RPCs) are used to communicate between the client and server.
There are several types of client-server architecture. One of the architectures is the Two Tier Architecture, where a client is directly connected to a server. This architecture has a good application development speed and works well in homogeneous environments when the user population work is small. The problem that exists in this architecture is the distribution of application logic and processing in this model. If the application logic is distributed to dozens of client systems, the application maintenance will be very difficult. To overcome the limitations of the Two-Tied Architecture, Three Tier Architecture is introduced. By introducing the middle tier, clients connect only to the application server instead of connecting directly to the data server. In this way, the load of maintaining the connection is removed. The database server is able to manage the storage and retrieve the data well. Thus, the application logic and processing can be handled in any application systematically. To enhance the Three Tier Architecture, it can be extended to N-tiers when the middle tier provides connections to various types of services, integrating and coupling them to the client, and to each other. For example, the web server is added to Three Tier Architecture to become Four Tier Architecture where the web server handles the connection between application server and the client. Client side languages are languages that are sent to the client, and then processed (interpreted and displayed). JavaScript is a client side language. Server side languages are languages that are processed on the server before the result is then sent to the client and displayed.
Advantages of Client/Server Architecture
The client/server model is particularly recommended for networks requiring a high degree of reliability, the main advantages being:
Centralized resources: given that the server is the centre of the network, it can manage resources that are common to all users, for example a central database would be used to avoid problems caused by redundant and inconsistent data.
Improved security: as the number of entry points giving access to data is not so important
Server-level administration: as clients do not play a major role in this model, they require less administration
Scalable network: Using this architecture it is possible to remove or add clients without affecting the operation of the network and without the need for major modification
Disadvantages of Client/Server Model
Client/Server architecture also has the following drawbacks: increased cost: due to the technical complexity of the server a weak link: the server is the only weak link in the client/server network, given that the entire network is built around it! Fortunately, the server is highly fault tolerant (primarily thanks to the RAID system) Client/Server system operation.
Communication between Browser and Web Server
When web browsers communicate with a web server, a number of important things happen during the conversation. The browser and the server “talk” to each other using a relatively simple protocol called HTTP, which stands for the Hyper Text Transfer Protocol.
Hyper Text:
The idea of hyper text is that it links you from one page to another (we used to call the links (hyperlinks) but that has been shortened to just links. However, the concept of Hyper Text is central to this course in that the specific text that is transferred follows a standard called the Hyper Text Markup Language (HTML).
Transfer Protocol
When two programs want to talk to each other both programs have to “speak the same language.” A protocol is a very specific description of a series of messages that two programs use to communicate.The web server sends the HTML to the browser over the internet and the browser renders the HTML into the nicely formatted page that you see on your screen.
Hypertext Transfer Protocol
HTTP is an application layer protocol provided by IP. The messages and methods that allow communication between a Web Server and a Web Client are introduced. Read this webpage and make sure you understand Figure 1, which illustrates the HTTP Request Message Format.
i)Hypertext Transfer Protocol
Often abbreviated as HTTP, this is a communications protocol. It is used to send and receive webpages and files on the Internet. It was developed by Tim Berners-Lee and is now coordinated by the W3C. HTTP version 1.1 is the most common used version today. HTTP works by using a user agent to connect to a server. The user agent could be a web browser or spider. The server must be located using a URL or URI. This always contains http:// at the start. It normally connects to port 80 on a computer. A more secure version of HTTP is called HTTPS: This contains https:// at the beginning of the URL. It encrypts all the information that is sent and received. This can stop malicious users such as hackers from stealing the information. HTTPS is often used on payment websites. HTTPS uses port 443 for communication instead of port 80.
ii)Request Message
The request message contains the following:
Request line, such as GET /images/logo.gif HTTP/1.1, which requests the file logo.gif from the /images directory
Headers, such as Accept-Language: en
An empty line
An optional message body
The request line and headers must all end with two characters: a carriage return followed by a line feed, often written. The empty line
must consist of only and no other whitespace. In the HTTP/1.1 protocol, all headers except Host are optional. A request line containing only the path name is accepted by servers to maintain compatibility with HTTP clients before the HTTP/1.0 standard. Even this site has a HTTP at it’s beginning, which is: HTTP (Hyper Transfer Protocol) is a communication protocol and it is used to send and receive webpages and other data files on the internet. A more secure version of HTTP is called HTTPS (Hyper Transfer Protocol Secure). It encrypts all the information sent and received. This can stop hackers from stealing information; HTTPS is often used on payment websites.