Distributed System Model
Distributed System Model
MODEL
1
SYSTEM MODEL
Topics
▪ Introduction
▪ Architectural Models
▪ Fundamental Models
2
SYSTEM MODEL
Introduction
▪ An architectural model of a distributed
system is concerned with the placement of
its parts and the relationships between
them.
▪ Examples include:
Client-Server model
Peer-to-Peer model
3
SYSTEM MODEL
Introduction
▪ Variations of client-sever model can be
formed by:
The partition of data or replication at
cooperative servers
The caching of data by proxy servers and
clients
The use of mobile code and mobile agents
The requirement to add or remove mobile
devices in a convenient manner
4
SYSTEM MODEL
Introduction
▪ Fundamental Models deal with a more formal
description of the properties that are common in
all of the architectural models.
5
SYSTEM MODEL
Introduction
▪ Message communication in distributed
systems has the following properties:
Delay
Failure
Security attacks
6
SYSTEM MODEL
Introduction
▪ Message communication issues are addressed
by three models:
Interaction Model
❖ It deals with performance and with the difficulty of
setting of time limits in a distributed system.
Failure Model
❖ It attempts to give a precise specification of the faults
that can be exhibited by processes and
communication channels.
Security Model
❖ It discusses possible threats to processes and
communication channels.
7
Architectural Models-Intro
▪ The architecture of a system is its structure in
terms of separately specified components.
8
SYSTEM MODEL
Architectural Models-Intro
9
SYSTEM MODEL
Software Layers
▪ Software architecture referred to:
The structure of software as layers or modules in
a single computer.
The services offered and requested between
processes located in the same or different
computers.
10
SYSTEM MODEL
Software Layers
Layer N
Layer 2
Layer 1
11
SYSTEM MODEL
Software Layers
▪ Platform
The lowest-level hardware and software
layers are often referred to as a platform
for distributed systems and applications.
❖ These low-level layers provide services to
the layers above them, which are
implemented independently in each
computer.
12
SYSTEM MODEL
Software Layers
Software Layers
▪ Middleware
A layer of software whose purpose is
❖ to mask heterogeneity presented in
distributed systems.
❖ To provide a convenient programming
model to application developers.
15
SYSTEM MODEL
17
SYSTEM MODEL
19
SYSTEM MODEL
22
SYSTEM MODEL
23
SYSTEM MODEL
24
SYSTEM MODEL
25
SYSTEM MODEL
• Design flexibility
• Topology
• Protocol
• Messaging over TCP,
UDP, ICMP
Underlying physical
net is transparent to
developer
P2P Goals
• Cost reduction through cost sharing
• Client/Server: Server bears most of the cost
• P2P: Cost spread over all the peers (+Napster, ++Gnutella,…)
• Interoperability
• for the aggregation of diverse resources (storage, CPU, …)
• Increased autonomy
• independence from servers, hence providers (e.g., A way
around censorship, licensing restrictions, etc.)
Goals (cont.)
• Anonymity/privacy
• Difficult to ensure with a central server
• Required by users who do not want a server/provider to know
their involvement in the system
• Collaboration
• Computation
• Databases
• Others
P2P File Sharing (cont.)
• Examples of P2P file sharing applications:
• Napster
• disruptive; proof of concept
• Gnutella
• open source
• KaZaA
• at some point, more KaZaAtraffic than Web traffic!
• eDonkey
• popular in Europe
• BitTorrent:
• 53% of all P2P traffic in June 2004 was BitTorrent traffic
• and many others…
P2P Communication
• Instant Messaging (IM)
• User A runs IM client on her PC
• Intermittently connects to Internet; gets new IP
address for each connection
• Registers herself with “system”
• Learns from “system”that user B in her “buddy list”is
active
• User A initiates direct TCP connection with User B: P2P
• User A and User B chat.
• Can also be voice, video and text.
• Audio-Video Conferencing
• Example: Voice-over-IP (Skype)
P2P Databases
• Fragments large database over physically distributed
nodes
• Overcomes limitations of distributed DBMS
• Static topology
• Heavy administration work
• Dissemination of data sources over the Internet
• Each peer is a node with a database
• Set of peers changes often (site availability, usage patterns)
• Examples:
• AmbientDB (http://homepages.cwi.nl/~boncz/ambientdb.html)
• XPeer: self-organizing XML DB
What is a DHT?
• Hash Table
• data structure that maps “keys” to “values”
• Interface
• put(key, value)
• get(key)
• Idea:
• Assign particular nodes to hold particular content (or reference
to content)
• Every node supports a routing function (given a key, route
messages to node holding key)
What is a DHT? (cont.)
DHT in action
DHT in action: put()
DHT in action: put()
DHT in action: put()
DHT in action: get()
Iterative vs. Recursive Routing
Resource Management
Fundamental Models
▪ Introduction
▪ Interaction Model
▪ Failure Model
▪ Security Model
64
SYSTEM MODEL
Fundamental Models-Intro
▪Fundamental Models are concerned with a
more formal description of the properties
that are common in all of the architectural
models.
65
SYSTEM MODEL
Fundamental Models-Intro
▪Aspects of distributed systems that are
discussed in fundamental models are:
Interaction model
❖ Computation occurs within processes.
❖ The processes interact by passing
messages, resulting in:
• Communication (information flow)
• Coordination (synchronization and ordering of
activities) between processes
❖ Interaction model reflects the facts that
communication takes place with delays.
Failure model
❖ Failure model defines and classifies the
faults. 66
SYSTEM MODEL
Fundamental Models-Intro
Security model
❖ Security model defines and classifies the
forms of attacks.
67
SYSTEM MODEL
Interaction Model
▪Distributed systems are composed of many
processes, interacting in the following
ways:
Multiple server processes may cooperate
with one another to provide a service
❖ E.g. Domain Name Service
A set of peer processes may cooperate
with one another to achieve a common
goal
❖ E.g. voice conferencing
68
SYSTEM MODEL
Interaction Model
69
SYSTEM MODEL
70
SYSTEM MODEL
❖ Bandwidth
• The maximum amount of information that can
be transmitted over a computer network in a
given time.
• Communication channels using the same
network, have to share the available bandwidth.
❖ Jitter
• The variation in the time taken to deliver a
series of messages.
• It is relevant to multimedia data.
❑For example, if consecutive samples of audio
data are played with differing time intervals,
then the sound will be badly distorted.
71
SYSTEM MODEL
73
SYSTEM MODEL
Interaction Model-Variations
▪Two variants of the interaction model
In a distributed system it is hard to set time
limits on the time taken for process
execution, message delivery or clock drift.
Interaction Model
75
SYSTEM MODEL
Interaction Model
▪Event ordering
In many cases, we are interested in
knowing whether an event (sending or
receiving a message) at one process
occurred before, after, or concurrently with
another event at another process.
76
SYSTEM MODEL
Interaction Model
❖ For example, consider a mailing list with users X, Y,
Z, and A.
1. User X sends a message with the subject Meeting.
• In real time, X’s message was sent first, Y reads it and replies;
Z reads both X’s message and Y’s reply and then sends
another reply, which references both X’s and Y’s messages.
Interaction Model
78
SYSTEM MODEL
Interaction Model
• Some users may view two messages in the wrong order,
for example, user A might see
79
SYSTEM MODEL
Failure Model
▪In a distributed system both processes and
communication channels may fail – That is,
they may depart from what is considered to
be correct or desirable behavior.
▪Types of failures:
Omission Failures
Arbitrary Failures
Timing Failures
80
SYSTEM MODEL
Failure Model
▪Omission failure
Omission failures refer to cases when a
process or communication channel fails to
perform actions that it is supposed to do.
Failure Model
Failure Model
▪Arbitrary failure
Arbitrary failure is used to describe the
worst possible failure semantics, in which
any type of error may occur.
❖ E.g. a process may set a wrong values in its
data items, or it may return a wrong value in
response to an invocation.
Failure Model
The omission failures are classified
together with arbitrary failures shown
below
Class of failure Affects Description
Fail-stop Process Process halts and remains halted. Other processes may
detect this state.
Crash Process Process halts and remains halted. Other processes may
not be able to detect this state.
Omission Channel A message inserted in an outgoing message buffer never
arrives at the other end’s incoming message buffer.
Send-omission Process A process completes a send, but the message is not put
in its outgoing message buffer.
Receive-omission Process A message is put in a process’s incoming message
buffer, but that process does not receive it.
Arbitrary Process or Process/channel exhibits arbitrary behaviour: it may
(complex) channel send/transmit arbitrary messages at arbitrary times,
commit omissions; a process may stop or take an
incorrect step. 84
SYSTEM MODEL
Failure Model
▪Timing failure
Timing failures are applicable in
synchronized distributed systems where
time limits are set on process execution
time, message delivery time and clock drift
rate.
Class of Failure Affects Description
Failure Model
▪Masking failure
It is possible to construct reliable services
from components that exhibit failure.
❖ E.g. multiple servers that hold replicas of
data can continue to provide a service when
one of them crashes.
86
SYSTEM MODEL
Security Model
▪The security of a distributed system can be
achieved by securing the processes and
the channels used in their interactions.
87
SYSTEM MODEL
Security Model
▪Protecting Objects
Access rights
❖ Access rights specify who is allowed to
perform the operations on an object.
• Who is allowed to read or write its state.
Principal
❖ Principal is the authority associated with
each invocation and each result.
❖ A principal may be a user or a process.
❖ The invocation comes from a user and the
result from a server.
88
SYSTEM MODEL
Security Model
The sever is responsible for
❖ Verifying the identity of the principal (user) behind
each invocation.
❖ Checking that they have sufficient access rights to
perform the requested operation on the particular
object invoked.
❖ Rejecting those that do not.
89
SYSTEM MODEL
Security Model
▪Other possible threats from an enemy
Denial of service
❖ This is a form of attack in which the enemy
interferes with the activities of authorized
users by making excessive and pointless
invocations on services of message
transmissions in a network.
90
SYSTEM MODEL
Security Model
Mobile code
❖ Mobile code is security problem for any process
that receives and executes program code from
elsewhere, such as the email attachment.
91