You are on page 1of 5

Client-Server Architecture

Client-server architecture, architecture of a computer network in which many


clients (remote processors) request and receive service from a centralized server
(host computer). Client computers provide an interface to allow a computer
user to request services of the server and to display the results the server
returns. Servers wait for requests to arrive from clients and then respond to
them. Ideally, a server provides a standardized transparent interface to clients
so that clients need not be aware of the specifics of the system (i.e., the
hardware and software) that is providing the service. Clients are often situated
at workstations or on personal computers, while servers are located elsewhere
on the network, usually on more powerful machines. This computing model is
especially effective when clients and the server each have distinct tasks that
they routinely perform. In hospital data processing, for example, a client
computer can be running an application program for entering patient
information while the server computer is running another program that
manages the database in which the information is permanently stored. Many
clients can access the server’s information simultaneously, and, at the same
time, a client computer can perform other tasks, such as sending e-mail.
Because both client and server computers are considered intelligent devices,
the client-server model is completely different from the old “mainframe” model,
in which a centralized mainframe computer performed all the tasks for its
associated “dumb” terminals.

Two-Tier and Three-Tier Architecture?

All projects are broadly divided into two types of applications 2 tier and 3 tier
architecture. Basically high level we can say that 2-tier architecture is Client
server application and 3-tier architecture is Web based application.

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.

1
Figure 7.1 Two-Tier Architecture

The above figure shows the architecture of two-tier. Here there is direct
communication between client and server, there is no intermediate between
client and server.

Let’s take a look at real life example of Railway Reservation two-tier


architecture:

Let’s consider that first Person is making Railway Reservation for Mombasa to
Nairobi by Rift Valley Railways at Counter No. 1 and at same time second
Person is also try to make Railway reservation of Mombasa to Nairobi from
Counter No. 2

If staff from Counter No. 1 is searching for availability into system & at the
same time staff from Counter No. 2 is also looking for availability of ticket for
same day then in this case there might be good chance of confusion and chaos
occurs. There might be chance of to lock the Railway reservation that reserves
the first.

But reservations can be made anywhere from the Kenya, then how is it
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, this technology is called as “Client-Server
Technology“.

2
The Two-tier architecture is divided into two parts:

1) Client Application (Client Tier)


2) Database (Data Tier)

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 at the same time, as a result it cause a data
integrity issue.

Advantages:

Easy to maintain and modification is bit easy

Communication is faster

Disadvantages:

In two tier architecture application performance will be degraded upon


increasing the users.

Cost-ineffective

Three Tiered Client/Server

Figure 7.2: Three Tiered Client/Server

Sometimes an application may be tiered in at least three distinct pieces. One


piece is the presentation or graphical user interface (GUI). Another piece is the
logic, functions, procedures, and objects that materialize this particular
application. Well another piece is the data management most often materialized
by a database.

3
The three tiered architecture allows for one central server location for all the
business logic and one central server location for all of the data leading to
reuse, consistency, and uniformity of applications in this environment.

The presentation layer supports the GUI. Sometimes this is called a GUI-lite
application. There may be many different kinds of GUI.

The middle section materializes the application. Though this is called the
application logic it is really much larger then just logic formulas and includes
all function and procedures that make the application an application for a
particular domain. Many of the elements in this area are tailored for the
application needs. Sometimes this layer is called the business rules or logic.

The last layer is the data. This is most often materialized by a database. This
layer does not have to be limited to a database. Alternatively, a large
computational server could act as a mathematical engine.

The three tiered layering is popular because it forces clean lines between the
three layers. The ``thin'' client can easily be moved to other architectures. The
application logic can be used by other applications in the system. The database
layer allows for plug and play of many different database vendors.

Each layer may have a special interface or use a more generic interface
protocol. An example of a GUI protocol is xterm or html. An example of a
database protocol is SQL/Net.

Three-tier architecture typically comprise a presentation tier,


a business or data access tier, and a data tier. Three layers in the three tier
architecture are as follows:

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

4
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.

Three-tier Architecture

Advantages

High performance, lightweight persistent objects

Scalability – Each tier can scale horizontally

Performance – Because the Presentation tier can cache requests, network


utilization is minimized, and the load is reduced on the Application and Data
tiers.

High degree of flexibility in deployment platform and configuration

Better Re-use

Improve Data Integrity

Improved Security – Client is not direct access to database.

Easy to maintain and modification is bit easy, won’t affect other modules

In three tier architecture application performance is good.

Disadvantages

Increase Complexity/Effort

You might also like