1
Module -2 (Client/Server Application Components)
Classification of Client/Server Systems- Two-Tier Computing, Middleware, Three-Tier
Computing- Model View Controller (MVC), Principles behind Client/Server Systems.
Client/Server Topologies. Existing Client/Server Architecture. Architecture for Business
Information System.
MODULE 2 CSA Prepared by Divya Visakh, AP, CSE
2
Types of Client-Server Architecture
The functionality of Client-Server architecture is in various tiers.
1-tier architecture
The architecture in this specific client-server category incorporates various settings, including
configuration settings and marketing logic, within a single device. Although the wide range of
services provided by the 1-tier architecture establishes it as a dependable resource, managing
such an architecture proves challenging. This difficulty primarily arises from the variability of
data, often leading to duplicated efforts. The 1-tier architecture comprises multiple layers, such
as the presentation layer, business layer, and data layer, which are unified through a specialized
software package. The data residing within this layer is typically stored either in local systems or
on a shared drive.
MODULE 2 CSA Prepared by Divya Visakh, AP, CSE
3
2-tier architecture
The best environment is possessed by this architecture, where the client’s side stores the user
interface and the server houses the database, while either the client’s side or the server’s side
manages the database logic and business logic.
The 2-tier architecture outpaces the 1-tier architecture due to its absence of intermediaries
between the client and server. Its primary application is to eliminate client confusion, and an
instance of its popularity lies in the online ticket reservation system.
3-tier architecture
MODULE 2 CSA Prepared by Divya Visakh, AP, CSE
4
Unlike 2-tier architecture that has no intermediary, in 3-tier client-server architecture, middleware
lies between the client and the server. If the client places a request to fetch specific information
from the server, the request will first be received by the middleware. It will then be dispatched to
the server for further action. The same pattern will be followed when the server sends a
response to the client. The framework of 3-tier architecture is categorized into three main layers,
presentation layer, application layer, and database tier.
All three layers are controlled at different ends. While the presentation layer is controlled at the
client’s device, the middleware and the server handle the application layer and the database tier
respectively. Due to the presence of a third layer that provides data control, 3-tier architecture is
more secure, has invisible database structure, and provides data integrity.
N-tier architecture
N-tier architecture is also called multi-tier architecture. It is the scaled form of the other three
types of architecture. This architecture has a provision for locating each function as an isolated
layer that includes presentation, application processing, and management of data
functionalities.
MODULE 2 CSA Prepared by Divya Visakh, AP, CSE
5
Model-View-Controller Pattern (MVC)
Model-view-controller architectural patterns use three components:
1. A model component acts like a business layer that can manipulate requests and
responses to create a coherent experience.
2. A view component that controls the user interface logic and helps improve the
user’s experience.
3. A controller component that processes incoming requests, business logic, and
other factors so the model and view components can operate efficiently.
MVC Architecture
● 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 Combobox menu to the user (coordinates with model)
○ Controller: sends message to model about the user’s selection of country
name.
● 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.
● The figure below represents MVC in client-server:
MODULE 2 CSA Prepared by Divya Visakh, AP, CSE
6
Middleware in Client Server Environment
Server: A server is a computer program that provides services, data, information to other
computer programs.
Client: A client is a host computer, requests services or information from the server. the
client is also called a user. In a computer system, a client is a computer program that asks
something from the server and the server gives the information back to the client
computer.
Middleware: It is software that helps to connect the operating system and applications. Or
it is software that runs between client and server processes. Generally, this software is
written in such a way that the user never notices the presence of middleware. It also helps
in delivering secure and transparent services to users.
Types of Middleware Services:
MODULE 2 CSA Prepared by Divya Visakh, AP, CSE
7
The different types of middleware services are RDA, RPC, and MOM.
● RDA: Remote Data Access(RDA), which implements an RDA protocol for
sending data manipulation language statements to an appropriate database
server for processing and transporting the result back to the invoking process.
● RPC: Remote procedure calls (RPCs). RPC is used in network operating
system services.
● MOM: Message-oriented middleware(MOM) is used as a mechanism for
storing and forwarding message queuing. It helps when client and server
processes communicate asynchronously.
Middleware is Useful For
1. Security
2. Transaction Management
3. Message Queues
4. Application Server
5. Web Server
MODULE 2 CSA Prepared by Divya Visakh, AP, CSE
8
Principles behind Client/Server Systems:
● Scalability: Client/server systems should be designed to accommodate
increasing numbers of users and data without significant performance
degradation.
● Reliability: Systems should be reliable, with mechanisms in place to handle errors
and failures gracefully.
● Security: Data integrity and confidentiality must be ensured through secure
authentication, authorization, and encryption mechanisms.
● Interoperability: Systems should be able to communicate and work seamlessly
with other systems, regardless of their underlying technologies.
● Performance: Systems should be optimized for speed and efficiency to deliver a
responsive user experience.
Client/Server Topologies:
● Client-Server: Traditional client/server topology where clients request services
from a central server.
● Peer-to-Peer (P2P): All nodes in the network act as both clients and servers,
sharing resources and services directly with each other.
MODULE 2 CSA Prepared by Divya Visakh, AP, CSE
9
● Hybrid: Combination of client-server and peer-to-peer architectures, allowing for
greater flexibility and scalability.
● Cloud-based: Clients interact with services hosted on remote servers over the
internet, leveraging cloud computing resources.
Architecture for Business Information System:
"BIS" typically stands for "Business Information System." A Business Information
System (BIS) is a combination of software, hardware, and network resources designed
to facilitate the efficient collection, processing, storage, and dissemination of business
information for decision-making purposes within an organization.
Here's how we can structure a Business Information System using client-server
architecture:
Client Tier:
● User Interfaces: Provide various interfaces for users to interact with the
system. This could include web browsers, mobile apps, or desktop
applications tailored to different user roles and requirements.
● Client-Side Processing: Perform certain tasks locally on the client device
to enhance responsiveness and reduce server load. This might include
data validation, simple calculations, or client-side caching.
Middle Tier (Application Server):
● Business Logic: Implement the core functionality of the system here. This
includes processing user requests, executing business rules, and
orchestrating interactions between various components.
● APIs (Application Programming Interfaces): Define APIs that expose
endpoints for clients to communicate with the server. These APIs handle
requests, process data, and return responses to clients. Common
protocols for APIs include REST, SOAP, or GraphQL.
MODULE 2 CSA Prepared by Divya Visakh, AP, CSE
10
● Session Management: Manage user sessions, authentication, and
authorization. Ensure that users are accessing appropriate resources and
maintain session state throughout user interactions.
Database Tier (Server):
● Data Storage: Store business data in a centralized database system.
Depending on the requirements, this could be a relational database (e.g.,
MySQL, PostgreSQL) or a NoSQL database (e.g., MongoDB, Cassandra).
● Data Access Logic: Implement logic to interact with the database, execute
queries, and manipulate data. This layer abstracts the database details
from the rest of the system.
● Transaction Management: Ensure data integrity and consistency by
managing transactions and enforcing ACID properties (Atomicity,
Consistency, Isolation, Durability).
Communication Protocols:
● Use standard communication protocols like HTTP/HTTPS for client-server
communication over the internet.
● Employ TCP/IP for reliable data transmission between clients and servers.
● Depending on specific requirements, other protocols such as WebSocket
for real-time communication or SMTP for email integration might be
utilized.
Security:
● Implement robust security measures to protect the system from
unauthorized access, data breaches, and other security threats.
● This includes authentication mechanisms, authorization controls, data
encryption, firewalls, intrusion detection/prevention systems, and regular
security audits.
Scalability and Performance:
● Design the system to scale horizontally or vertically to accommodate
increasing user loads and data volumes.
● Utilize techniques such as load balancing, caching, and optimization to
improve system performance and responsiveness.
Monitoring and Management:
● Implement logging mechanisms to record system events, user activities,
and errors for auditing and troubleshooting purposes.
● Employ monitoring tools to track system health, performance metrics, and
resource utilization.
● Set up alerting mechanisms to notify administrators of potential issues or
anomalies in the system.
MODULE 2 CSA Prepared by Divya Visakh, AP, CSE
11
MODULE 2 CSA Prepared by Divya Visakh, AP, CSE