Client-Server Architecture is a shared architecture system where loads of clients and servers are divided. The providers of a resource or service are called servers and the service requesters are called clients. Client and server may be on the same or in a different network. It is also termed as a network-computing structure because every request and its associated services are distributed over a network.
In the client-server architecture, the client computer sends a request for data to the server through the internet, the server accepts the request for data, processes it, and delivers the data packets requested back to the client. Clients do not share any of their resources.
The server has the potential to manage numerous clients at the same time. And a single client can connect to various servers at a given timestamp, where each server provides a different set of services to that specific client. The server is profoundly stable and scalable to return answers to clients. Example – World wide web, Emails, etc.
How does the Client-Server Architecture model work?
Client – A Client is a computer (Host) who requests for a particular service and is capable of receiving information from the service providers (Servers).
Servers – A server is a remote computer that provides information (data) or access to particular services to the requested client.
The user enters the URL(Uniform Resource Locator) of the website or file into the browser.
The Browser then requests the DNS(DOMAIN NAME SYSTEM) Server for the specific resource.
DNS Server looks up and responds with the IP address of the WEB Server.
The Browser sends the request in the form of HTTP/HTTPS to the WEB Server’s IP which is provided by the DNS server.
The requests are sent in the form of a structure of formatted data like XML or JSON format.
The Server looks for the requests in its database and sends them over to the client.
The Server sends the response again in the form of HTTP/HTTPS to the client and the data is sent back in the XML or JSON format.
In the browser, the website with the file is displayed. This rendering is done with the help of the DOM (Document Object Model) interpreter, CSS interpreter, and JS Engine.
Advantages of the Client-Server model
- Centralized system with all data in a single place.
- Backups and network security are controlled centrally.
- Easy maintenance.
- Cost-efficient requires less maintenance cost and Data recovery is possible.
- Resources can be shared amongst different platforms.
Disadvantages of the Client-Server model
- A specialist network operating system is needed.
- The server is expensive to purchase.
- The viruses present in the server or uploaded to the server also get transmitted to the client.
- Data packets could get attacked and modified during transmission.
Difference between Client-Server Application and Web Application
- A Client-Server application is a software that runs on the client computer and accesses the remote server for the information by making the request.
- A Client-Server application can be platform-specific as well as cross-platform depending on the programming language used.
- In a Client-Server application, the user interaction with the server is mainly through a user interface.
- A Client-Server is a two-tier architecture.
- In Client-Server application, the server machine is a host runs single or multiple- server programs sharing their resources with clients.
- A Client-Server application lacks robustness because if a server fails, the requests cannot be completed.
- Web Application is a software application that runs on the remote server and a web browser is known as a web application.
- A web application is platform-independent because it requires only a web browser.
- In a web application, user interaction is through a compatible web browser.
- A web application uses multi-tier architecture.
- A web application is hosted in a browser-controlled environment, or it is often programmed in a language that supports the browser.
- A web application is robust friendly.