Evolution of Client-Server Architecture and Web-servers

Computer Architecture —

Damsak Bandara
6 min readMay 15, 2021

“Computer Architecture is a set of rules and methods that describe the functionality, organization, and implementation of computer systems.”

Client-server architecture —

“Architecture of a computer network in which many clients request and receive service from a centralized server. “

As an IT Professional, it is a must to have a good understanding of software architecture. It will help developers to better design systems that are robust and scalable. Through this article let’s discuss the evolution of software architectures up to Microservices.

1-Tier Architecture

An application may contain 3 layers namely the presentation layer, the application layer, and the database layer. In this architecture, all these layers are inside a single software package.

Example — Microsoft office.

These computer programs can do their operations offline. In other words, these applications do not require a network connection to perform their functionality. However, these applications were not enough to cater to the growing technological demands.

Client-Server Computing

This refers to the computing architecture where clients request and receive services from a centralized server. Client and server may in be the same system or 2 different places communicating via a computer network.

There are 3 main components in Client-Server Computing.

  • Client — Process that requests services from the central server.
  • Server — Process that provides requested services to the client.
  • Middleware — Software that is used to do the communication from client to server.

2-tier Architecture

The 2-tier architecture is a special kind of architectural style where the logic of the application is buried either inside the client-side user interface or within the database server or both. The client communicates directly with the data tier. Consists of 2 main layers called the Client tier and the Data tier. These applications are easy to build. However, there are many disadvantages of this architecture,

  • Security is less. That is because the client directly communicates with the database.
  • Performance loss when the number of users increases.
  • Runs slowly.

N-Tier Architecture

This refers to any application architecture that consists of more than one-tier. However, most of the applications consist of 3 main layers (3-tier architecture). Increasing the number of layers will make the application slow and harder to maintain. That is why most of the applications have just 3 tiers.

3-tier Architecture

3-tier Architecture organizes applications into 3 main logical and physical tiers called the presentation tier, application tier, and the data tier. Unlike the 2-tier architecture, this architectural style is a well-established one.

Presentation layer

Represents the user interface and communication layer of the application. Users interact with this layer. Commonly available on web browser-based applications. This layer communicates with other tiers by sending and receiving data in the browser.

Application Tier(Logic)

This tier is mainly responsible for controlling the application’s core functionality. Communicates with the data tier using API calls. Also known as the middle tier or logic tier. This tier is normally developed using programming languages such as JAVA, Perl, Python. etc.

Data Tier

The main responsibility of this tier is to store and manage the information which was processed by the application. In 3-tier architecture Date tier cannot directly communicate with the presentation tier.

There are many advantages of the 3-tier architecture,

The physical and logical separation of functionality is the main benefit of this architecture. This creates the possibility to run a separate operating system and server platform on a specified tier.

  • Increases modularity. Teams can update or replace specific parts of the application with minimum effect on the product as a whole.
  • The application can be scaled up and out easily according to the needs of the client.
  • Increased flexibility. Teams can easily adapt to new technologies.
  • Improved security. The presentation tier does not directly communicate with the data tier.

However, with the popularity of the internet, developers needed to find a way to make their system accessible through the internet.

Microservices Architecture

The traditional way is to build a software system as a single unit comprising of application tier, presentation tier, and data tier (monolithic architecture). However, these systems are harder to maintain and scale. Therefore Engineers needed to find another way to make these large monolithic applications more modular and easy to maintain. This causes the emergence of Microservices architecture. It is an architectural style where the application is developed as a suite of small services. These services can communicate with each other using a lightweight mechanism such as an HTTP resource API.

Microservices architecture puts each element of functionality in a separate process increasing the modularity of the overall application.

A separate article will be published with a detailed view of the microservices architecture.

Web Servers, Web Containers, and Web Application servers in the context of JAVA

Web Server

A web server is a computer program that stores and delivers static content(text, application data, video, and image) for a website. Content is delivered to the clients according to the requests made. Uses only HTTP protocol and serves only web-based applications. There is no support for multithreading.

Examples: — Apache Tomcat, Resin, Jetty

Webserver contains only web or servlet container.

Web servers can be used for —

  • servlets
  • JSP
  • structs
  • JSF

and many more. However, Web servers cannot be used for EJBs. It does not support the full JAVA EE functionalities.

Web Containers / Servlet Containers

This is the main component that is responsible for managing the lifecycle of the servlets. Runs in a separate process. Web container will map the URL to the correct servlet and check its access rights.

Main tasks of a web server —

  • Life Cycle Management.
  • Object Pooling
  • Security
  • Multithreaded Support.

Application server

Used to expose the business logic of the application to the clients. This generates dynamic content. Uses multithreading to support multiple requests in parallel. Have the capability to serve web and enterprise-based applications.

In the context of java, the application server contains web containers and EJB containers. Application servers can be used to implement full JAVA EE functionality.

Examples:

  • Apache TomEE — Application server built on top of standard Apache Tomcat.
  • Oracle WebLogic
  • WebSphere
  • WildFly
  • GlassFish

--

--