Client Server
Client Server
Client and Server are two applications involved in communication. These components work together over a network. It involves the client requesting service from the server. The Server provides the requested service.
Client-server denotes a relationship between cooperating programs in an application, composed of clients initiating requests for services and servers providing that function or service.
What is a Client? Explain features of a Client.
A client is a program that runs on the local machine requesting service from the server. A client program is a finite program means that the service started by the user and terminates when the service is completed. The typical features of the Client are:
1. It is front-end of an application.
2. It manages user-interface portion.
3. It validates data entered by the user.
4. It dispatches requests to server program.
What is a server? Explain features of a server.
A server is a program that runs on the remote machine providing services to the clients. When the client requests for a service, then the server opens the door for the incoming requests, but it never initiates the service. A server program is an infinite program means that when it starts, it runs infinitely unless the problem arises. The server waits for the incoming requests from the clients. When the request arrives at the server, then it responds to the request. The typical features of the Server are:
1. Performs a back-end task.
2. Receives requests from clients.
3. Executes database retrievals and updates.
4. Manages data integrity.
5. Dispatches response to clients.
Client Server Model
The client-server model, or client-server architecture, is a distributed application framework dividing tasks between servers and clients, which either reside in the same system or communicate through a computer network or the Internet. The client relies on sending a request to another program in order to access a service made available by a server. The server runs one or more programs that share resources with and distribute work among clients.
The client server relationship communicates in a request response messaging pattern and must adhere to a common communications protocol, which formally defines the rules, language, and dialog patterns to be used. Client-server communication typically adheres to the TCP/IP protocol suite.
TCP protocol maintains a connection until the client and server have completed the message exchange. TCP protocol determines the best way to distribute application data into packets that networks can deliver, transfers packets to and receives packets from the network, and manages flow control and retransmission of dropped or garbled packets. IP is a connectionless protocol in which each packet traveling through the Internet is an independent unit of data unrelated to any other data units.
Client requests are organized and prioritized in a scheduling system, which helps servers cope in the instance of receiving requests from many distinct clients in a short space of time. The client-server approach enables any general-purpose computer to expand its capabilities by utilizing the shared resources of other hosts. Popular client-server applications include email, the World Wide Web, and network printing.
Categories of Client-Server Computing
There are four main categories of client-server computing:
One-Tier architecture: consists of a simple program running on a single computer without requiring access to the network. User requests don't manage any network protocols, therefore the code is simple and the network is relieved of the extra traffic.
Two-Tier architecture: consists of the client, the server, and the protocol that links the two tiers. The Graphical User Interface code resides on the client host and the domain logic resides on the server host. The client-server GUI is written in high-level languages such as C++ and Java.
Three-Tier architecture: consists of a presentation tier, which is the User Interface layer, the application tier, which is the service layer that performs detailed processing, and the data tier, which consists of a database server that stores information.
Difference between one tier, two tier and three tier architecture.
We have three things with us
1. Client -> Which requests the data
2. Server -> Which serves the data
3. Database -> The place where data is kept
Now let us come to the different architecture of DBMS :
1 Tier => The Client, Server and Database resides on the same machine.
2 Tier => The client on one machine and the server and database on one machine, i.e. two machines.
3 Tier => We have three different machines one for each client, server and a separate machine dedicated to database.
N-Tier architecture: divides an application into logical layers, which separate responsibilities and manage dependencies, and physical tiers, which run on separate machines, improve scalability, and add latency from the additional network communication. N-Tier architecture can be closed-layer, in which a layer can only communicate with the next layer down, or open-layer, in which a layer can communicate with any layers below it.