Client Server Architecture

Learn via video courses
Topics Covered

Overview

Networking is the act of making communication and data exchange between different communities and organizations. In today's world, technology is constantly enhancing and evolving. As a result, today's corporations rely heavily on technology to fulfill their needs and grow in a competitive environment, especially in IT.

Therefore, today's organizations need a model or a system that makes it easy to collect, process, and acts on the corporate data according to the business needs, thus ensuring survivability and boosting efficiency in the modern world's market. The client-server model serves all those purposes efficiently.

What is Client Server Architecture?

Before exploring the client-server architecture in depth, let us try to understand the model in layman's terms:

A real-world analogy of client-server architecture can be quickly ordering food for delivery. You place the order by making a call to the restaurant; someone picks up the call, takes the order, and delivers it. This is pretty much the fundamental principle of client-server architecture.

Hence there are only two entities involved:

  • Clients are the ones who request services.
  • The Server is the one who provides data access or requested services to the clients.

client-server-architecture

The client-server architecture, also known as the network computing model, is a network application that breaks down workload and tasks that are present with the same system or need to communicate within the network. The purpose of the client-server framework is the same as the distributed computing systems as all the computers (nodes) are doing independent tasks.

A client-server architecture resembles the request-response pattern and should stick to a standard communication protocol that defines the communication language and rules. Hence this architecture adheres to the TCP protocol suit.

Thus the essential client-server architecture components are:

  1. Workstations (clients):
    A workstation is a system of users that is sometimes also named the client's computer. The client's computer generally acts as the front end and provides an interface to the user For example: Visiting any website, you request the webpage from its domain. So here you are acting as a client.

  2. Servers:
    A server generally acts as the backend and provides a fine standardized interface to different workstations so that clients need not be aware of the specifics of the system (i.e., the software and hardware) that is providing the service. For example: the client asks for the webpage, then the server responds with the webpage to the client.

  3. Networking Devices:
    Networking devices act as a specific medium that connects different workstations or clients to a powerful server. , For example, Networking devices used in client-server architecture have different purposes and properties; For isolated network segmentation, bridges are used. For making a connection to a server, various workstation hubs are used.

In brief, the steps involved in the client-server model are:

  • First, the client sends their request via a network-enabled device.
  • Then, the network server accepts and processes the user request.
  • Finally, the server delivers the response to the client.

How Does Client Server Architecture Work?

As we have discussed above client-server model, consist of client nodes and server node. These two build a network linking servers and other users who communicate with each other.

In a client-server architecture, clients are viewed as consumers, whereas the server acts like a producer. A user or consumer sends a request to the server using a network medium, and then data is delivered to the user according to the submitted request. Here the client remains connected to the server.

To understand this process better, let us learn how the browser interacts with the server:

client-server-architecture-2

  1. The user enters the URL (uniform resource locator) of any file or any website, and the browser sends the request to the DNS (domain name system) server.
  2. The DNS server looks in the mapping (website URL and the IP address) and returns the IP address of the web server.
  3. Then the browser sends over an HTTP or HTTPS request to the web server's IP address, which was provided by DNS.
  4. Then the server responds with the data that is files or the webpage.
  5. Then the browser renders the information provided by the server.

Here at a very high level, the communication between the client and server happens over the HTTP packets.

This architecture paradigm worked very effectively with what others refer to as Web 2.0. Here the internet became the customer's remote environment.

Become a confident backend developer with our Node.js Free course. Enroll now and learn to architect and implement robust client-side solutions.

Visualizing Client Server Architecture

Simple visualization of client-server architecture :

visualizing-client-server-architecture

Examples of Client Server Architecture

Here are a few of the applications or examples of the client-server architecture we use in daily life, more often than we think.

Web Servers

Web Servers are powerful and robust computational devices that can manage many websites simultaneously. These high-performance servers host many different websites, and clients/users can access them through the medium of the Internet. You can install numerous types of web server applications on your computers and laptops, such as Apache HTTP Server, lighttpd, and Sun Java System Web Server, etc., which offer links to the various web pages hosted on the world wide web.

E-Mail Servers

Numerous brands of dedicated software aid Email servers; are valuable assets for organizations and individuals as well. That allows users to share information. To enable this process, many standard network protocols run on different machines and use various email programs to send and receive emails.

These protocols include the Mail Transport Protocol which is responsible for mail delivery from the client application to the server. The SMTP protocol is used for the transfer of email between the servers. Mail Access Protocol is used to retrieve emails from the server. Internet Message Access Protocol (IMAP) and Post Office Protocol V3 (POP3) are others. The Email service today uses the client-server architecture.

File Servers

A file Server serves as an exclusively allocated place for storing the data, and many terminal systems manage those servers in the real world it is a centralized location for files that can be accessed by multiple users in real time. They generally store the data as blobs of binary data or files. If you are storing files on any cloud base service such as Microsoft Office, Google docs, Dropbox, or OneDrive, then you are using the file servers.

There are several protocols used in the File Server. Server Message Block (SMB) is the most common protocol for LAN file servers. File Transfer Protocol (FTP) and Secure FTP are used to serve files over the internet. File servers are high-performance, relatively low cost, and easy to extend, but they require administration and security.

Domain Name Server (DNS)

Domain Name System or DNS maps the human-readable domain names (www.scaler.com) to their corresponding machine-readable IP address (192.0.2.43). All devices that are connected to the internet, such as smartphones, laptops, and PCs, find and communicate with each other using numbers. These numbers are known as IP addresses. DNS act as a decentralized digital directory that maps domain name with these numbers.

There are two types of DNS services:

  • Authoritative DNS:
    It has the final authority over a domain and provides answers to recursive DNS servers with the IP address.
  • Recursive DNS:
    They do not handle the queries directly. Instead, they connect to a service known as a resolver.

Note:
The example of the working of DNS service is explained in the working of client-server architecture.

Types of Client Server Architecture

The functionality of client-server architecture varies in many tires. Below are the different types with their corresponding tiers:

  • 1-Tier Architecture (All-in-One System) :

    1-tier-client-server-architecture

    In this type of architecture, all types of settings are present in a single network device. In the category, the architecture contains all sorts of settings that include the user interface, business logic, and database logic on a single device at the base of the client-server architecture.

    The variety of services offered by the 1-tier architecture makes it one of the most reliable ones; however, handling 1-tier architecture is a bit complex. This is mainly due to the data variance. It often results in duplication of work.

    Below are the layers that hold 1-tier architecture:-

    • Presentation layer
    • Business layer
    • Data access layer

    A simple example of 1-tier architecture would be anytime you install a Database in your system and access that database software to practice SQL queries.

  • 2-Tier Architecture (Client and Server):

    2-tier-client-server-architecture

    In this type of architecture, the user interface is stored on the client side, and the database logic is stored on the server. The business and database logic can be stored on either the client or server side. When this logic is on the server side, it is called thin client fat sever; however when this logic is on the client side, it is called fat client thin sever.

    Below are the layers that hold 2-tier client-server architecture:-

    • Interface layer (client)
    • Database layer (server)

    The 2-tier architecture is faster and more efficient than the 1-tier architecture because the 2-tier architecture does not have any mediator between the server and the client. Hence this architecture provides the best environment as application design of 2-tier architecture is easy and quick response time; however, this framework includes less security and is not able to handle a large number of users.

    A simple example of 2-tier architecture is where the client and server interact directly without any mediator, like an online ticket reservation system.

  • 3-Tier Architecture (Middleware):

    3-tier-client-server-architecture In this type of architecture, middleware is present between the client (presentation layer) and the server (database layer) to further enhance security. The third layer (middleware) helps facilitate more complex management of business logic, optimizing the flexibility and performance of the architecture.

    If a client needs some information from the server, the client will send a request which will be received by the middleware, and then will be dispatched to the server for further processing. In the same pattern, the server will send the response, which will be received by the middleware, and then the response will reach the client's end.

    Below are the layers that hold 3-tier architecture:-

    • Presentation layer (client)
    • Application layer (middleware)
    • Database Tier (server)

    All three layers are controlled at different ends. The presentation layer is maintained on the client's device; the middleware and the server handle the application layer and the database tier, respectively.

    This architecture provides security of data, invisible database structure, and increased performance; however, this framework has high communication complexity due to the middleware presence.

Client Server Architecture Advantages

  • Centralized Control:
    The main advantage of client-server architecture is centralized control since the network administrator has total leverage to control the process management and activities in the network. All the necessary information is also stored in a single location. As a result, if any problem occurs in the whole network can be solved from one central location.
  • Security:
    Due to the centralized network, the data is well protected. Moreover, security can be enforced with access controls such as only privileged users being given access. Also, data recovery is easy.
  • Management:
    The client-server architecture is implemented on a distributed model basis; hence we can restore, upgrade, replace, and move the server without influencing the clients. All the files are stored in a centralized location; hence it is easier to manage them.
  • Easily Scalable:
    A client-server model is highly scalable. The user can increase the number of resources such as clients or servers without any interruptions. The architecture can handle massive weights given the network, clients, or system overloads. The architecture also regulates data overwhelming by the decline in data duplication.
  • Easily Accessible:
    Clients can log in to the system anytime, irrespective of the location or the platform of their choice. Hence all the users can access their corporate information without having to use a terminal or a processor. Users have the right to access the information in the centralized location accordingly.

Client Server Architecture Disadvantages

  • Robustness:
    Due to the centralized nature of the client-server architecture, if there is any problem in the central server, the whole network will be disrupted. Thus, a client-server model is less robust.
  • Network Congestion:
    This problem occurs when several clients are requesting from the same server, it will result in slowing down the connection speed or a crash. An overloaded server creates many difficulties in accessing data.
  • Requires Cost:
    In a client-server architecture, the cost of setting up and maintaining the server is usually very high, as it is on the network operations. As the networks are powerful, they are expensive; hence not all users will be able to take advantage of them.
  • Regular Maintenance:
    The servers used in the network is going to work non-stop; hence they need to be maintained adequately. There is a need for technical network managers as well as skilled staff for the maintenance of servers.
  • Virus Attack:
    If the server is infected with a virus or trojan, then it will be transferred to all the clients since the network consists of linked clients and servers. The server is also vulnerable to (DOS) and (MITM) attacks.

Conclusion

  • The client-server architecture brings remote network management, a high level of processing to improve performance, and market-driven business.
  • The client-server architecture consists mainly of a client (Interface medium), a server (Database medium), and a network medium.
  • Client-server architecture is used in email servers, web servers, file servers, and Domain Name System (DNS) services.
  • There are different tiers of client-server architecture, which are used according to the need.
  • Client-server architecture is highly scalable, manageable, secure, and centralized. All the data is stored in a central location.
  • However, client-server architecture requires continuous maintenance and plenty of setting-up costs and can lead to network congestion. They are also prone to virus attacks.