0% found this document useful (0 votes)
23 views20 pages

CST 426 - Module 2 Notes

The document provides an overview of client/server architecture, detailing one-tier, two-tier, and three-tier models, as well as N-tier architecture and the MVC pattern. It discusses the advantages and disadvantages of each architecture, emphasizing the importance of separating application components for better scalability, security, and maintainability. Key principles of client/server systems, such as hardware and software independence, open access to services, and process distribution, are also outlined.

Uploaded by

Real Cricket
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views20 pages

CST 426 - Module 2 Notes

The document provides an overview of client/server architecture, detailing one-tier, two-tier, and three-tier models, as well as N-tier architecture and the MVC pattern. It discusses the advantages and disadvantages of each architecture, emphasizing the importance of separating application components for better scalability, security, and maintainability. Key principles of client/server systems, such as hardware and software independence, open access to services, and process distribution, are also outlined.

Uploaded by

Real Cricket
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

CST426 –Client Server Architecture (Dept. of Comp.

Sc, Mangalam College of Engineering)

Module -2 (Client/Server Application Components)


What Does One-Tier Architecture Mean?

One-tier architecture involves putting all of the required components for a software application or
technology on a single server or platform. This kind of architecture is often contrasted with multi-
tiered architecture or the three-tier architecture that's used for some Web applications and other
technologies where various presentation, business and data access layers are housed separately.

Basically, one-tier architecture keeps all of the elements of an application, including the interface,
middleware and back-end data, in one place. Developers see these types of systems as the simplest
and most direct. Some experts describe them as applications that could be installed and run on a
single computer. The need for distributed models for Web applications and cloud hosting solutions
has created many situations where one-tier architectures are not sufficient. That caused three-tier
or multi-tier architecture to become more popular. The benefits of a multi-tier solution are often
evident. They can provide better security, better performance and more scalability, as well as
individual environments for data centers and front-end applications. However, the appeal of a
single-tier architecture can relate to the costs that are involved, where it might make more sense to
keep simpler applications contained in one easy platform.

Two-tier Client/Server Model

The application processing is done separately for database queries and updates and for business
logic processing and user interface presentation. Usually, the network binds the back-end of an
application to the front-end, although both tiers can be present on the same hardware. Sometimes,
the application logic (the real business logic) is located in both the client program and in the
database itself. Quite often, the business logic is merged into the presentation logic on the client
side. As a result, code maintenance and reusability become difficult to achieve on the client side. On
the database side, logic is often developed using stored procedures.

The architecture of any client/server environment is by definition at least a two-tier system, the
client being the first tier and the server being the second. The Client requests services directly from
server i.e. client communicates directly with the server without the help of another server or server
process.

In a typical two-tier implementation, SQL statements are issued by the application and then handed
on by the driver to the database for execution. The results are then sent back via the same
mechanism, but in the reverse direction. It is the responsibility of the driver (ODBC) to present the
SQL statement to the database in a form that the database understands.

There are several advantages of two-tier systems:

• Availability of well-integrated PC-based tools like, Power Builder, MS Access, 4 GL tools provided
by the RDBMS manufacturer, remote SQL, ODBC.

• Tools are relatively inexpensive.

• Least complicated to implement.


CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

• PC-based tools show Rapid Application Development (RAD) i.e., the application can be developed
in a comparatively short time.

• The 2-tier Client/Server provides much more attractive graphical user interface (GUI) applications
than was possible with earlier technology.

• Architecture maintains a persistent connection between the client and database, thereby
eliminating overhead associated with the opening and closing of connections.

• Faster than three-tier implementation.

• Offers a great deal of flexibility and simplicity in management.

Conversely, two-tier architecture has some disadvantages:

• As the application development is done on client side, maintenance cost of application, as well as
client side tools etc. is expensive. That is why in 2-tier architecture the client is called ‘fat client’.

• Increased network load: Since actual processing of data takes on the remote client, the data has to
be transported over the network. This leads to the increased network stress.

• Applications are loaded on individual PC i.e. each application is bound to an individual PC. For this
reason, the application logic cannot be reused.

• Due to dynamic business scenario, business processes/logic has to be changed. These changed
processes have to be implemented in all individual PCs. Not only that, the programs have to undergo
quality control to check whether all the programs generate the same result or not.

• Software distribution procedure is complicated in 2-tier Client/Server model. As all the application
logic is executed on the PCs, these entire machines have to be updated in case of a new release. The
procedure is complicated, expensive, prone to errors and time consuming.

• PCs are considered to be weak in terms of security i.e., they are relatively easy to crack.

• Most currently available drivers require that native libraries be loaded on a client machine.

• Load configurations must be maintained for native code if required by the driver.

• Problem areas are encountered upon implementing this architecture on the Internet.
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

Figure: Two – tier Client/Server Model

Client (Tier 1)

Application

Driver

Network
Interface

Network

Network Interface

Data base

Server (Tier 2)
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

Three-Tier Computing

In 3-tier architecture, there is an intermediary level, meaning the architecture is generally split up
between:

 A client, i.e. the computer, which requests the resources, equipped with a user interface
(usually a web browser) for presentation purposes
 The application server (also called middleware), whose task it is to provide the requested
resources, but by calling on another server
 The data server, which provides the application server with the data it requires

Reusability is hard to achieve if pieces of business logic must be distributed across systems and
several databases are involved. To avoid embedding the application’s logic at both the database side
and the client side, a third software tier is inserted in between. In the threetier architecture, most of
the business logic is located in the middle tier (here business logic is encapsulated as a component in
a separate tier). In this structure, when the business activity or business rules change, only the
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

middle tier must be modified. In three-tier architecture application responsibilities are divided into
three logical categories (in other words, the business system must provide three types of main
services)

 Presentation (GUI) or user services: Include maintaining the graphical user interface and
generating what users see on the monitor. Presentation Logic dealing with:
 Screen formatting
 Windows management
 Input editing
 What-if analysis

 Application services or business rules: These include executing applications and controlling
program flow. Business logic dealing with:
 Domain and range validation
 Data dependency validation
 Request/response architecture of Inter Process Communication level

 Database services or data server: Which refers to the management of underlying databases.
Server logic deals with:
 Data access
 Data management
 Data security
 SQL parsing

In three-tier model, a third server is employed to handle requests from the client and then pass
them off to the database server. The third server acts as proxy for all client requests. Or, in other
words we can say: “In three-tier client/server system the client request are handled by intermediate
servers which coordinate the execution of the client request with subordinate servers.” All client
requests for the database are routed through the proxy server, thereby creating a more secure
environment for your database. In two-tier environment, we can say that the client uses a driver to
translate the client’s request into a database native library call. In a three-tier environment, the
driver translates the request into a “network” protocol and then makes a request via the proxy
server. Figure 1.8 represents the three-tier Client/Server model.
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

The proxy server makes the database request on behalf of the client and passes the results back
after they have been serviced by the database. This approach eliminates the need for DBMS to be
located on the same server. There are a couple of drawbacks to this model. One is that it requires
that a small server process (listener) be set up on the middle server. Secondly, it requires all your
client requests be transmitted into a “network” protocol. First-tier (client-tier): The main
responsibility of this tier is to receive user events and to control the user interface and presentation
of data. As most of the software is removed from the client, the client is called “Thin Client”. Mainly
browser and presentation code resides on this tier. Second-tier (application-server-tier): The
complex application logic is loaded here and available to the client tier on request from client. This
level forms the central key towards solving the 2-tier problem. This tier can protect direct access of
data. Object oriented analysis aims in this tier to record and abstract business processing in business
projects. This way it is possible to map this tier directly from the case tools that support object
oriented analysis.

Database-server-tier

This tier is responsible for data storage. This server mostly operates on a relational database. The
boundaries between tiers are logical. One can run 3-tiers in one and the same machine. The
important fact is that the system is neatly structured and well-planned definitions of the software
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

boundaries exist between the different tiers. Some of the advantages of using three-tier model
include:

• Application maintenance is centralized with the transfer of the business logic for many end users
into a single application server. This eliminates the concern of software distribution that is
problematic in the traditional two-tier Client/Server model.

• Clear separation of user-interface-control and data presentation from applicationlogic. Through


this separation more clients are able to have access to a wide variety of server applications. The two
main advantages for client-applications are clear: quicker development through the reuse of pre-
built business-logic components and a shorter test phase, because the server-components have
already been tested.

• Many users are able to access a wide variety of server applications, as all application logic are
loaded in the applications server.

• As a rule servers are “trusted” systems. Their authorization is simpler than that of thousands of
“untrusted” client-PCs. Data protection and security is simpler to obtain. Therefore, it makes sense
to run critical business processes that work with security sensitive data, on the server.

• Redefinition of the storage strategy won’t influence the clients. RDBMS’ offer a certain
independence from storage details for the clients. However, cases like changing table attributes
make it necessary to adapt the client’s application. In the future, even radical changes, like switching
from an RDBMS to an OODBMS, won’t influence the client. In well-designed systems, the client still
accesses data over a stable and well-designed interface, which encapsulates all the storage details.

• Load balancing is easier with the separation of the core business logic from the database server.

• Dynamic load balancing: if bottlenecks in terms of performance occur, the server process can be
moved to other servers at runtime.

• Business objects and data storage should be brought as close together as possible. Ideally, they
should be together physically on the same server. This way network load for complex access can be
reduced.

• The need for less expensive hardware because the client is ‘thin’.

• Change management is easier and faster to execute. This is because a component/ program
logic/business logic is implemented on the server rather than furnishing numerous PCs with new
program versions.

• The added modularity makes it easier to modify or replace one tier without affecting the other
tier.

• Clients do not need to have native libraries loaded locally.

• Drivers can be managed centrally.

• Your database server does not have to be directly visible to the Internet. An additional advantage
is that the three-tier architecture maps quite naturally to the Web environment, with a Web
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

browser acting as the ‘thin’ client, and a Web server acting as the application server. The three-tier
architecture can be easily extended to N-tier, with additional tiers added to provide more flexibility
and scalability. For example, the middle tier of the three-tier architecture could be split into two,
with one tier for the Web server and another for the application server. Some disadvantages are:

• The client does not maintain a persistent database connection.

• A separate proxy server may be required.

• The network protocol used by the driver may be proprietary.

• You may see increased network traffic if a separate proxy server is used.

N-Tier Architecture (multi-tier)

N-tier architecture (with N more than 3) is really 3 tier architectures in which the middle tier is split
up into new tiers. The application tier is broken down into separate parts. What these parts are
differs from system to system. The following picture shows it:

The primary advantage of N-tier architectures is that they make load balancing possible. Since the
application logic is distributed between several servers, processing can then be more evenly
distributed among those servers. N-tiered architectures are also more easily scalable, since only
servers experiencing high demand, such as the application server, need be upgraded. The primary
disadvantage of N-tier architectures is that it is also more difficult to program and test an N-tier
architecture due to its increased complexity.

MVC

Model–view–controller (MVC) is a software architectural pattern commonly used for developing


user interfaces that divide the related program logic into three interconnected elements. This is
done to separate internal representations of information from the ways information is presented to
and accepted from the user.
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

Traditionally used for desktop graphical user interfaces (GUIs), this pattern became popular for
designing web applications. Popular programming languages have MVC frameworks that facilitate
the implementation of the pattern.

MVC is an abbreviation for Model-View-Controller.

For ease of development and deployment of the project, the web-application is divided into basic 3
modules: model, view and controller.

As the name suggests:

Model: responsible for handling database interaction with the controller (database layer)

View: responsible for displaying contents of user (presentation layer)

Controller: responsible for acting as per user action (business logic layer)

Considering the example of AWT or Java Swing (Drop-down menu/Combobox menu), if the user
wants to retrieve the states belonging to the selected country from drop-down menu,

Model: retrieves the selected names of states from the database

View: displays the Combo box menu to the user (coordinates with model)

Controller: sends message to model about the user’s selection of country name.

Considering Struts or Spring or Hibernate frameworks:

Model: Java Beans (database)


CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

View: HTML or JSP page

Controller: back-end servlet (converted JSP’s)

The complete architecture is mainly controlled by the controller. The end-user (client) actions on
view, based on which the controller delegates the requests to model. The model retrieves required
data from beans or database (through database queries) and responses back to the controller. Based
on the response received, the controller changes/modifies the data in view.

Principles behind Client/Server Systems:

The components of Client/server architecture must conform to some basic principles, if they are to
interact properly. These principles must be uniformly applicable to client, server and to
communicate middleware components. Some of the main principles are as follows:

 Hardware independence
 Software independence
 Open access to services
 Process distribution
 Standards

Hardware independence

Here the client server and communication middleware should be able to run on multiple hardware
platforms (IBM, DEC, Compaq, Apple and so on) without any functional differences.

Software independence

Here the client server and communication middleware processes should support multiple operating
systems (such as windows 98, windows NT, Apple Mac system, OS/2, Linux and Unix), multiple n/w
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

protocols (such as IPX and TCP/IP) and multiple applications (spreadsheet, Database, electronic mail
and so on)

Open Access to services

 All clients in the system must have open (unrestricted) access to all the services provided
within the network and these services must not be dependent on the location of the client
or the server.
 Services should be provided on demand to the client.

Process distribution

Processing of information is distributed among clients and servers

The decision of the application processing load must conform to the following rules

 Client and server processes must be autonomous entities. This property enables to clearly
define the functionality of each side and it enhances the modularity and flexibility of the
system.
 Local utilization of resources (at both clients and server sides) must be maximized. The client
and server process must fully utilize the processing power of the host computers. To utilize
all resources, the server process must be shared among all the client processes, that is a
server should service multiple requests from multiple clients.
 Scalability and flexibility requires that the client and server process be easily upgradable to
run on more powerful hardware and software platforms. This provides additional
capabilities and better performance for the client/server processes
 Interoperability and integration that client and server processes be integrated to form a
system. Swapping a server process must be transparent to the client process.

Standards

 All the principles that are formulated must be based on standards applied within the
client/server architecture.
 Eg: Standard must govern the user interface, data access, network protocols, interprocess
communication and so on.
 Standards ensure all the components interact in an orderly manner to achieve the desired
results
 There is no universal standard for all the components
Eg: A) an application can be based on ODBC (open Data base connectivity) instead of integrated
Database application programming interface for data access.( IDAPI)

[ODBC and IDAPI are database middleware components that enable the system to provide a data
access standard for multiple processes.]

B) The application might use IPxTCP/IP [Transmission control protocol or internet protocol], as the
network protocol.
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

Standards should ensure that all the components (servers, clients and communication middle ware )
are able to interact as long as they use the same standards.

Client Server Topologies

A client server topologies refers to the physical layout of the client/server network in which all the
clients and servers are connected to each other. The possible client/server topological design and
strategies used are as follows:

(i) Single client, Single server

(ii) Multiple client, single server

(iii) Multiple client, multiple server

Single Client, Single server

In this topology, one client is directly connected to one server

Client
Server
Multiple Client, Single server

In this topology, several clients are directly connected to only one server.

Client 1
Server
Client 2

Multiple client, multiple server

In this topology, several clients are connected to several servers.


CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

Client 1 Server1

Client 2 Server2

Client 3 Server3

Existing Client/server Architecture

1. Mainframe based environment:

In mainframe systems all the processing takes place on mainframe and usually dumb terminals that
are end user platform are used to display data on screens.

Mainframes are highly centralized and known to be integrated systems.

Dumb terminals do not have any autonomy.

Terminal 1 Terminal 2 Terminal 3

Database
Main frame

Disadvantages of this environment

1. Mainframes are over structured, time consuming, creates application backlogs.

2. Has limited data manipulation capabilities

3. Very flexible
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

4. Very Expensive

5. Unable to keep up with the demand for new applications

2. LAN based environment

 In client/server lan one or more stations called server gives services to other
stations, called clients.
 The server versions of network OS is installed on server, and the client version
network OS is installed on clients.
 A network may have several servers, each dedicated for a particular task. These
servers enable many clients to share access to the same resources and enable the
use of high performance computer systems to manage the resources.
 A file server allows the client to access shared data stored on the disk connected to
the file server. Each client can send data to be printed to the print server, which then
spools and print them. The file server station server runs a server file access program
and a print server station a server print handling program.
 Users, Applications and resources are distributed and linked by single local area
network

3. Internet based environment

Through internet vast amount of information becomes available from the same application
and the interface.
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

Here web browsers are universal clients. A web browser is a minimalist client that interprets
information it receives from a server, and displays it graphically to a user. The client takes
complete responsibility for displaying the hypertext document, and for the users response
to it.

Eg: Web browsers like Netscape and spyglass interprets HTML commands. These browsers
execute HTML commands and display text and images on a specific GUI platform; It can also
navigate from one page to other using embedded hyper links

The server system supplies multimedia document (pages) and runs some application
programs (HTML forms and CGI programs) on behalf of client.

Open System and standards

 Client server computing offers organizations the ability to distribute computing, storage and
other resources as dictated by business needs. But the standard-based open systems
provide the necessary flexibility and interoperability for maximum benefits.
 IEEE technical committee on open systems offers the following definition of open systems.
A comprehensive and consistent set of international information technology
standards and functional standard profiles that specify interfaces, services and supporting
formats to accomplish interoperability and portability of applications data and people.

Standard areas

Standards address 4 areas of client/server computing

1. Platforms: These standards are developed by hardware and software vendors usually in response
to defacto standards such as intel chips, Unix and DOS with windows.

2. Networks: Industry standard networking protocols such as OSI and TCP/IP is being used.

3. Middleware: This is the software that sets between application and the OS including GUI’s,
Databases, email systems etc.

4. Applications: Organizations decide on standard applications to facilitate work group interaction


and work product compatibility.
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

Interoperability and portability are provided through adherence to standards. Portability means that
software will run on other platforms without requiring modifications to application code.
Interoperability means that the software can work with other platforms.

Existing standards:

Currently there are recognized standards for the server operating systems environment and for the
network protocols.

UNIX:

 Developed by UNIX system laboratories a division of AT & T.


 This is an OS for scientific, engineering and technical applications
 Written in C
 It takes the advantage of power of RISC technology and offers ,multitasking and multiuser
support. It offers excellent price/performance characteristics .
 Vendors such as IBM, Digital and Microsoft offer their own versions of UNIX –AIX,
ULTRIX,XENIX respectively.
 Latest version is UNIX system V Release 4 (SVR4) It uses less memory and needs less
hardwork requirements so it can be used in client machines

POSIX:

 Portable operating system interface (POSIX) from IEEE is a UNIX based specification, which is
a standard for server OS.
 It is a uniform means for a C language application. It can request service from an OS
regarding of the underlying hardware architecture or operating environment.
 Programmers can choose from a list of standards library functions and system header files.

TCP/IP

 Transmission control protocol/Internet Protocol (TCP/IP) is a defacto standard for


interconnecting incompatible computers. It is used in a LAN based micros connected to a
UNIX host.
 TCP/IP is a set of network and transport protocol. TCP runs on top of IP, controls the packet
delivery and IP takes care of inter platform and internet work communications

OSI

 Open system interconnection model was developed by ISO to provide a common basis for
communication system standards.
 It can support heterogeneous communication.
 OSI model provides a hierarchical layer structure in which each layer performs a specific n/w
function, services the next high layer and accepts requests from the next lower layer.
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

Open Systems

 Open systems is a methodology for integrating divergent technologies, creates a flexible


environment for solving business problems using open (or non- proprietary) software and
open hardware.
 There are 3 interdependent components that must be in place to create a true open systems
environment. Components of open system environment are:

Standards- based product and technology

Open development infrastructure

Management directives

 Standard based products and technology portability and interoperability. Closed


technologies will dead end pogress.
 Open development infrastructure: Standard must ensure that current implementation of
technology build on prior implementations and are able to support future implementations
 Management directives: These directives ensure that technology does not benefit one group
at the expense of the organization.

Architecture for BIS

Business Information system is an integrated set of components for collecting, storing and
processing data and for providing information for business. Business firms rely on Information
Systems (IS) to carry out and manage the operations, interact with customers and compete in the
market place.

Three Layer Architecture:

Typically, a business information system follows a three layer architecture.

The user interface handles presentational tasks and controls the dialogue. The application Kernel
performs the business logics and the database access layer connects the application Kernel functions
to a database

PRESENTATION USER INTERFACE

Commuic DIALOGUE CONTROL

ation
Services APPLICATION
BUSINESS LOGIC
KERNEL

DATABASE ACCESS
DATA MANAGEMENT
DATABASE
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

General Forces

Business Needs Vs Construction complexity

Allocating functionality and data to the places where it is actually needed supports distributed
business process very well, but distributions raises a systems complexity. Few sources of complexity
are GUI, middleware and heterogeneous OS environment.

Processing styles

Different processing styles require different distribution decisions. Batch processing need processing
power close to the data and interactive processing should be close to input/output devices.

Distribution Vs Performance

We gain performance by distributed processing units executing tasks in parallel placing data close to
the processing and balancing workload between several servers. But as the level of distribution
increases the communication network overhead bottleneck in communication network increases.

Distribution Vs. security

In distributed environment the number of possible security holes increases because of greater
number of attack points.

Software distribution cost

The partitioning of system layers into client and server process enables distribution of the process
within the network, but the more software we distribute higher the distribution and installation cost
will occur in a centralised system.

Reusability Vs. Performance Vs. Complexity

Placing functionality on a server enforces code reuse and reduces client code size, but data must be
shipped to the server and the server must be enabling the functionality of request by multiple
clients.

Distribution Pattern

There are several distribution styles to distribute an information system by assigning client and
server roles to the components of the layered architecture.
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

Distributed Presentation

This pattern partitions the system within the presentation component. One part of the presentation
component is packaged as a distribution unit and processed separately from other parts of the
presentation, which can be packaged together with the other application layers.

Remote user interface

Instead of distributing presentation functionality the whole user interface becomes a unit of
distribution and act as a client of the application kernel on the server side.

Distributed application Kernel

The pattern splits the application Kernel into 2 parts which are processed separately.
CST426 –Client Server Architecture (Dept. of Comp. Sc, Mangalam College of Engineering)

Remote Database:

The database is a major component of business information system. Sometimes several application
work on the server database. This pattern can locate the database component on a separate node
within the system’s network.

Distributed database:

The database is decomposed into separate database components, which can interact using IPC. With
a distributed database an application can integrate data from different database systems, o data can
be stored more closely to the location where it is processed.

You might also like