0% found this document useful (0 votes)
53 views13 pages

Distributed Systems CH3-2022

The document discusses several system models and architectural models for distributed systems. It describes thin clients, client-server, and peer-to-peer architectures. It also covers services provided by multiple servers and variants of system architectures.

Uploaded by

Anis MOHAMMEDI
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)
53 views13 pages

Distributed Systems CH3-2022

The document discusses several system models and architectural models for distributed systems. It describes thin clients, client-server, and peer-to-peer architectures. It also covers services provided by multiple servers and variants of system architectures.

Uploaded by

Anis MOHAMMEDI
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/ 13

22/03/2022

System Models
l Real world Distributed Systems (DS) should be designed to function
correctly in the widest range of circumstances and in the face of many
possible difficulties and threats, such as:
l Widely varying modes of use: The components of a DS are subject to wide
variations in workload.
l the main page of the amazon.com website is accessed millions of times a day
l multimedia applications require high bandwidth and low latency

l Wide range of system environments: A distributed system must


accommodate heterogeneous hardware, operating systems, and networks.
l wireless networks operate at a fraction of the speed of local networks
l a system deployment may range from tens of computers to millions of
computers

l Internal Problems: Non-synchronized clocks, conflicting data updates,


hardware failure, …

l External Threats: Attacks on data integrity and security, denial of service,


Architectural Models
l Defines the set of components that make up a system and the
interplay between those components.

l It combines:
l A simplified functional model of the individual components
l The placement of components across a network of computers
l The interrelationships between the components

l At the core of this model is an initial classification of components into


l Server processes: the provider of a service
l Client processes: the invoker (user) or a service
l Peer processes: processes that cooperate and communicate in a
symmetrical manner to perform a task.

l Based on this classification, the responsibilities of each process can


be determined and used to assess workloads and the impact of
failures for each of them.

1
22/03/2022

Core System Architectures


l Thin Clients
l A software layer that supports a window-based user interface on a
computer that is local to the user while executing application programs on
a remote computer.
l Has similarly low management and hardware costs as the network
computer architecture, but instead of downloading the code, it runs them
on a remote compute server (typically a multiprocessor machine or
cluster).
l The main drawback of Thin Clients is its reliance on the network:
l Network failure during execution of the program can result in a loss of data
l Updating of the interface can be slow due to network latency
l Performance degrades rapidly as graphical usage increases.

NC / PC Compute Server

Application
Thin Client
network Process

Core System Architectures


l Thin Clients
l Example: X-11 Window System
l This is a service, developed for UNIX, which manages the display and
interactive input devices (keyboard, mouse) of the computer on which it
runs.
l It consists of an extensive library of procedures, known as the X-11
protocol, for displaying and modifying graphical objects in windows as well
as the creation and manipulation of the windows themselves.
l The X-11 system is known as the window server process, and the clients
are the application programs that the user is currently interacting with.
l The client programs interact with the server by invoking operations in the
X-11 protocol using a Remote Procedure Call (RPC) mechanism.
NC / PC Compute Server

Window
Application
Server network

2
22/03/2022

Core System Architectures


l Client-Server:
l Client processes interact with individual Server processes on separate
computers in order to access the shared resources that they manage.
l Servers may themselves be clients of other servers.

invocation
Client result Server
result
invocation
Server
result

Client invocation

Core System Architectures


l Client-Server:
l Client processes interact with individual Server processes on separate
computers in order to access the shared resources that they manage.
l Servers may themselves be clients of other servers.
l Example: The World Wide Web

invocation Servlet
Web Browser result Container
result
invocation
Web Server
result

Web Browser
invocation

3
22/03/2022

Core System Architectures


l Peer-to-Peer:
l All the processes involved in a task or activity play similar roles, interacting
cooperatively as peers without any distinction between client and server
processes or the computer that they function on.

Peer 2
Peer 1

Application
Application
Sharable
Objects Peer 3

Application

Peers 4 … N

Core System Architectures


l Peer-to-Peer:
l All the processes involved in a task or activity play similar roles, interacting
cooperatively as peers without any distinction between client and server
processes or the computer that they function on.
l Example: Gnutella File Sharing Service.

Peer 2
Peer 1

Gnutella
Gnutella Client
Client
Shared
Files Peer 3

Gnutella
Client

Peers 4 … N

4
22/03/2022

Variant System Architectures


l Services provided by multiple servers:
l Services may be implemented as several server processes in separate
host computers interacting as necessary to provide a service to client
processes.
l The servers may partition the set of objects on which the service is based
and distribute them between themselves, or they may maintain replicated
copies of them of several hosts.

Server
Client

Server Service

Client
Server

Variant System Architectures


l Services provided by multiple servers:
l Example: An online bookstore
l The store website is partitioned into two parts:
l Store Front: the part of the website through which users browse the inventory of
books for sale.
l Checkout: the part of the website through which users purchase books

Checkout
Web Server
Web Browser

Book Online Bookstore Service


Database

Web Browser
Store Front
Web Server

10

5
22/03/2022

Use of Caching and Replication


l These represent two key techniques for overcoming the Performance
and Quality of Service issues outlined in previous slides.

l Caching can significantly reduce client response times.


l Maintaining a local copy of resources reduces the need to access remote
servers.

l Replication can reduce network costs and balance computational


loads.
l Making copies of resources and distributed those resources throughout the
distributed allows clients to access copies of resources that have least
network costs.
l Also, making copies of a resource reduces the competition for that
resource, and careful placing of that resource and increase the
computational resources available to complete a given task.

11

Variant System Architectures


l Proxy Servers and Caches:
l A proxy is a server process that acts as an intermediary between a set of
clients and a set of servers.
l The clients send a message to the proxy passing a second message that
should be forwarded on a server.
l The proxy keeps track of what messages were send by which client, acts
as a client and sends the message to the relevant server, and finally, upon
receipt of a response from the server, forwards that response on to the
client.

Client Server

Proxy

Client Server

12

6
22/03/2022

Variant System Architectures


l Proxy Servers and Caches:
l A cache is a store of recently used data objects/resources that is closer
than the objects/resources themselves.
l When a new object/resource is received by a computer, it is added to its
cache, replacing some existing objects/resources if necessary.
l When an object/resource is needed by a client process, the caching
service first checks the cache:
l if an up-to-date copy is available, then the caching service returns that copy
l If not, an up-to-date copy is fetched, stored in the cache, and then returned to
the client process.

13

Load Balancing Techniques


l Distributed systems aim to allow tasks to be performed concurrently
without competing for the same resources and at the same time exploiting
all available computational resources (processor, memory, and network
capacities).
l For example, Java applets can reduce the load on the web server,
enabling it to provide a better service.
l Alternatively, the website can be replicated on multiple web servers and a
load balancing technique, such as multiple addresses for a single domain
name, can be used to spread the load over the replica servers.

14

7
22/03/2022

Variant System Architectures


l Web Gateway:
l Client browser contact web gateway
l Its request is handled by one of the available web-services
l Compare statefull vs stateless interaction
l Where do you place state?
l Load Balancing / Scheduling Techniques
Web-Server

Web Browser

Gateway Web-Server

Web Browser

Web-Server

15

Broker Design Pattern


l The Broker design pattern describes how to locate a remote object or service
(the term service here refers to a set of related software
functionalities, e.g. as described by a Java or a Web Interface).
l The Broker introduces a level of indirection between service/resource
clients and service/resource providers (servers), which allow indirect
communication patterns and loosely coupled, modular architectures
l The servers register their resource/service with the broker (1). When
the clients asks to interact with a specific resource/service (2), the
broker give them details on how to contact the right server (3).

(3)
Client Server
(2) Broker (1)

Service- Server
Repository

16

8
22/03/2022

Broker Design Pattern


l The Broker design pattern suits open and dynamic environments.
Compare:

Client Server

VS.:

Client Server

Broker

Service- Server
Repository

l How would you build fault tolerance upon this design pattern?

17

Variant System Architectures


l Mobile Code:
l This is code that can be sent from one computer to another and run at the
destination.
l This is not easy to do because many languages are compiled to machine code,
which is platform specific.
l One option would be to download the source code, but this is limited because:
(1) there is no guarantee that any libraries used would exist on the client
machine, and (2) the client machine would need a compiler to be stored and
would need to know how to invoke that compiler.
l Some languages, such as Java, can be used as they employ the concept
of a virtual machine to make themselves platform independent.
l The advantage of mobile code is that it is executed locally resulting in
good interactive response times.
l It is useful in cases where we want to augment a clients basic capabilities
(e.g. a 3D viewer for a web browser).
l The main issue with mobile code is security – how can we control what the
code does on the local machine in order to ensure that no malicious
activity occurs.

18

9
22/03/2022

Variant System Architectures


l Mobile Code:
l Example: Java Applets
l Java code that can be downloaded from a web server and executed via
the web browser.
l Strict security policies are enforced which require authority validated
certificates in order to gain access to many aspects of the client machine
(known as a Signed Applet).

Client Web Server


applet code

l Step 1: Client Request Results in the Downloading of Applet Code

Client Applet Web Server

l Step 2: Client Interacts with the Applet

19

Software Architecture for DS


l This layered model presents an abstraction of an individual computer that acts
as a node within some Distributed System.

l It consists of:
l Platform: A combination
of hardware and software
upon that provides the Applications, Services
N
basis for all applications. E
T
l Middleware: A layer of W
software whose purpose Middleware
O
is to mask heterogeneity
R
and to provide a convenient
programming model to K
application programmers Operating System

l Applications, Services: The


actual applications / services Platform
Computer and
that are implemented on the Network Hardware
node.

20

10
22/03/2022

What is Middleware?
l Middleware is the set of processes or objects in a group of computers
that interact with each other to implement communication and
resource-sharing support for Distributed Systems.
l It delivers an abstract layer of support that acts as a building block for the
construction of the target application(s).

l It provides high-level features such as:


l Remote Method Invocation
l Support for communication between groups of processes
l Event Notification
l Support for partitioning, placement, and retrieval of shared data objects
amongst cooperating computers
l Support for the replication of shared data objects
l Real-time Multimedia Transmission

l Examples of Middleware:
l Sun RPC, CORBA, Java RMI, Web Services, Microsoft’s Distributed
Component Object Model (DCOM).

21

Without Middleware

Applications, Services Applications, Services


N
E
T
W
O
R
K
Operating System Operating System

22

11
22/03/2022

With Middleware

Applications, Services Applications, Services


N
E
T
Middleware W Middleware
O
R
K
Operating System Operating System

23

With and Without Middleware...

Applications, Services
N Appl
E icati ons,
T Serv
ices
Middleware W
O
R
K
Operating System Operating System

24

12
22/03/2022

Limitations of Middleware
l Middleware is an abstracted communication infrastructure component
that aims to simplify the process of implementing a Distributed System.

l The services offered by middleware are based on a number of


assumptions about the nature of interaction between components of a
Distributed System.

l For example, a common assumption made is that all communications


are atomic.

l While for most systems this is sufficient, it is not for others:


l A reliable FTP service employs a non-standard form of interaction in which
the client downloading the file keeps track of the progress.
l If the download fails at any point, then the client requests that the
download be restarted from the point at which the failure occurred.
l This kind of service cannot normally be implemented through middleware.

25

Limitations of Middleware
l More generally, this is known as the “end-to-end argument” (Saltzer et
al., 1984):
l “Some communication-related functions can be completely and reliably
implemented only with the knowledge and help of the application standing
at the end points of the communication system. Therefore, providing that
function as a feature of the communication system itself is not always
sensible. (An incomplete version of the function provided by the
communication system may sometimes be useful as a performance
enhancement)”

l The point here is:


l The correct behaviour of a distributed system depends on checks, error-
correction mechanisms and security measures at many levels.
l Some require access to data that is specific to the application meaning
that communication system checks alone are insufficient.
l So, the remaining checks must be carried out in the application layer,
leading to a potential duplication of work.

26

13

You might also like