Distributed Architectures
1
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Objectives
After completing this lecture, the student will be able to
• Describe distributed architecture
• Analyze client server architecture
• Analyze 1-tier, 2-tier, 3-tier and N-tier architecture
2
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Contents
• Client Server architecture
• 1-tier, 2-tier, 3-tier and N-tier architecture
3
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
• A distributed system is a collection of computational and storage devices
connected through a communications network
• In this type of system, data, software, and users are distributed
• The subsystems or components within a distributed system communicate
with each other using a number of methods including message passing,
remote procedure calls (RPC), and remote method invocation (RMI)
• A distributed system can be modeled by the client-server architecture, and
this forms the basis for multi-tier architectures.
4
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
• Alternatives are the broker architecture such as CORBA, and the service-
oriented architecture (SOA) such as web services and grid services
• Key features:
o location transparency and
o its services reliability and availability
5
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
Client-Server
• The client-server model is the most commonly distributed system
architecture
• It is based on two communicating processes, usually running on different
processors, and thus decomposes a system into two major subsystems:
client and server
• The first process, the client, issues a request to the second process, the
server
• The server process receives the request (serving data from a database,
printing a document), carries it out, and sends a reply to the client
6
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
Client-Server
7
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
Client-Server
• Advantages:
o Separation of responsibilities such as user interface presentation and business
logic processing
o Reusability of server components
• Disadvantages:
o Lack of heterogeneous infrastructure to deal with the requirement changes
o Security complications
o Server availability and reliability
o Testability and scalability
o Fat clients with presentation and business logic together
8
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
Two-Tier Architecture
9
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
Advantages:
• Technical advantages when going from one tier to two tier architectures:
o Take advantage of client capacity to off-load work to the clients
o Work within the server takes place within one scope (almost as in 1 tier)
o The server design is still tightly coupled and can be optimized by ignoring
presentation issues
o Still relatively easy to manage and control from a software engineering point of
view
10
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
Disadvantages:
• The server has to deal with all possible client connections
o The maximum number of clients is given by the number of connections supported
by the server
• Clients are “tied” to the system since there is no standard presentation layer
o If one wants to connect to two systems, then the client needs two presentation
layers
• There is no failure or load encapsulation
o If the server fails, nobody can work.
o Similarly, the load created by a client will directly affect the work of others since
they are all competing for the same resources
11
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
Three-tier Architecture
12
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
Three-Layered Architecture
1. The presentation layer
• Managing the user interfaces of applications, including desktop
applications, Web browsers, and pervasive devices
• Provides a Web Server
• Servlet and JSP results caching and JSP tags caching
• Provides high-reliability, scalability, monitoring, and other features required
by enterprise applications
13
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
2. The business layer
• Contains the application’s business logic independent of the user interface,
including distributed components, running in the application server environment
• Enterprise Java Beans
3. The back-end layer
• Provides connectivity with enterprise systems and databases
• Databases, ERP, CRM, mainframe or other existing applications
14
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
Application servers and 3-Tiered Systems
• 3-tiered systems are common in e-commerce
and B2B applications
• Application servers provide a framework for
middle-tier applications
o Presentation
o Business Rules
• Services include
o Database connectivity
o Client connectivity
o Resource management
15
Faculty
©M. S. Ramaiah
of Engineering
University
& Technology
of Applied Sciences ©Ramaiah University of Applied Sciences
Distributed Architectures
Web Development Usage
• In the web development field, three-tier is often used to refer to websites,
commonly electronic commerce websites, which are built using three tiers:
1. A front-end web server serving static content, and potentially some cached
dynamic content
• In web based application, Front End is the content rendered by the browser
2. A middle dynamic content processing and generation level application
server
• Examples: Java EE, ASP.NET, PHP, Python platform
3. A back-end database or data store
16
•
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
N-Tier: Connecting to the Web
17
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Distributed Architectures
Advantages of Layered Architecture
• Each layer is selected to be a set of related services
o The architecture provides high degree of cohesion within the layer
• Each layer may hide private information from other layers
• Layers may use only lower layers, constraining the amount of coupling
• Each layer, being cohesive and is coupled only to lower layers, makes it
easier for reuse by others and easier to be replaced or interchanged
o Change of DB touches only the data store/access layer, change of browser
only changes the presentation layer of the previous slide
o Good for component design
18
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences
Summary
• A distributed system is a collection of computational and storage devices
connected through a communications network.
• The client-server model is the most commonly distributed system architecture.
19
Faculty of Engineering & Technology ©Ramaiah University of Applied Sciences