Client Server Architecture
Client Server Architecture
Client/Server is a term used to describe a computing model for the development of computerized
systems. This model is based on the distribution of functions between two types of independent and
autonomous processors: servers and clients. A client is any process that requests specific services from
server processes. A server is a process that provides requested services for clients. Client and server
processes can reside in the same computer or in different computers connected by a network.
Client:
The client is any computer process that requests services from the server. The client is also known as the front-
end application, reflecting the fact that the end user usually interacts with the client process.
Characteristics of a client
Request sender is known as client
Initiates requests
Waits for and receives replies.
Usually connects to a small number of servers at one time
Server:
The server is any computer process providing services to the clients. The server is also known as the back-end
application, reflecting the fact that the server process provides the background Services for the client process
Characteristics of a server
Receiver of request which is send by client is known as server
Passive (slave)
Waits for requests from clients
Upon receipt of requests, processes them and then serves replies
Usually accepts connections from a large number of clients
Typically does not interact directly with end-users
User Runs
1 the Query
Query is
2 sent to the
server Database
3
Workstation 4 Results are sent
back to the
Server Query is
run on the
Workstation server
Results are
5 presented to the
user
TYPES OF CLIENT/SERVER ARCHITECTURE
1. 2-tier architecture
2. 3-tier architecture
2-tier architecture
Two-Tier Architecture:
The two-tier is based on Client Server architecture. The two-tier architecture is like client server application. The
direct communication takes place between client and server. There is no intermediate between client and
server. Because of tight coupling a 2 tiered application will run faster.The above figure shows the architecture of
two-tier. Here the direct communication between client and server, there is no intermediate between client and
server.
Let’s take a look of real life example of Railway Reservation two-tier architecture:
Let’s consider that first Person is making Railway Reservation for Mumbai to Delhi by Mumbai Express at
Counter No. 1 and at same time second Person is also try to make Railway reservation of Mumbai to Delhi from
Counter No. 2
If staff from Counter No. 1 is searching for availability into system & at the same staff from Counter No. 2 is also
looking for availability of ticket for same day then in this case there is might be good change of confusion and
chaos occurs. There might be chance of lock the Railway reservation that reserves the first.
But reservations can be making anywhere from the India, then how it is handled?
So here if there is difference of micro seconds for making reservation by staff from Counter No. 1 & 2 then
second request is added into queue. So in this case the Staff is entering data to Client Application and
reservation request is sent to the database. The database sends back the information/data to the client.
In this application the Staff user is an end user who is using Railway reservation application software. He gives
inputs to the application software and it sends requests to Server. So here both Database and Server are
incorporated with each other, so this technology is called as “Client-Server Technology“.
On client application side the code is written for saving the data in the SQL server database. Client sends the
request to server and it process the request & send back with data. The main problem of two tier architecture is
the server cannot respond multiple request same time, as a result it cause a data integrity issue.
Advantages:
Disadvantages:
1. In two tier architecture application performance will be degrade upon increasing the users.
2. Cost-ineffective
3-tier architecture
A three level architecture is constituted by three types of machines: a user machine, a middle-level server and a
back end server.
A three-tier or a multi tier architecture has client, server and database(intermediator). Where the client
request is sent to the server and the server in turn sends the request to the database. The database sends back
the information/data required to the server which sends it back to the client.
1) Client layer
2) Business layer
3) Data layer
1) Client layer:
It is also called as Presentation layer which contains UI part of our application. This layer is used for the design
purpose where data is presented to the user or input is taken from the user. For example designing registration
form which contains text box, label, button etc.
2) Business layer:
In this layer all business logic written like validation of data, calculations, data insertion etc. This acts as a
interface between Client layer and Data Access Layer. This layer is also called the intermediary layer helps to
make communication faster between client and data layer.
3) Data layer:
In this layer actual database is comes in the picture. Data Access Layer contains methods to connect with
database and to perform insert, update, delete, get data from database based on our input data.
Advantages
3. Performance – Because the Presentation tier can cache requests, network utilization is minimized, and
the load is reduced on the Application and Data tiers.
5. Better Re-use
8. Easy to maintain and modification is bit easy, won’t affect other modules