Lesson 2 System - Models
Lesson 2 System - Models
MODELS
SYSTEM MODEL
Topics
Introduction
Architectural Models
Fundamental Models
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
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
SYSTEM MODEL
Introduction
Fundamental Models deal with a more formal
description of the properties that are common in
all of the architectural models.
Introduction
Message communication in distributed
systems has the following properties:
Delay
Failure
Security attacks
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.
Architectural Models-Intro
The architecture of a system is its structure in
terms of separately specified components.
Architectural Models-Intro
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.
Software Layers
Layer N
Layer 2
Layer 1
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.
Software Layers
Applications, services
Middleware
Operating system
Platform
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.
CLIENT/SERVER MODEL
Definition
Computing solution in which the presentation,
presentation logic, application logic, data
manipulation, and data layers are distributed
between client PCs and one or more servers
CLIENT/SERVER MODEL
Example
SYSTEM MODEL
Server
Client
Server
Client
Server
Client Web
server
Proxy
server
Client Web
server
Figure 7. Web proxy server
SYSTEM MODEL
Client Web
Applet code server
Web
Client Applet server
Compute server
Network computer or PC
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
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)
Fundamental Models
Introduction
Interaction Model
Failure Model
Security Model
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.
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.
SYSTEM MODEL
Fundamental Models-Intro
Security model
Security model defines and classifies the
forms of attacks.
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
SYSTEM MODEL
Interaction 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.
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
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.
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
send
Z
receive receive
m3 m1 m2
A
receive receive receive
t1 t2 t3
Interaction Model
• Some users may view two messages in the wrong order,
for example, user A might see
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
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
process p process q
send m receive
Communication channel
Outgoing message buffer Incoming message buffer
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.
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.
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.
Security Model
The security of a distributed system can be
achieved by securing the processes and
the channels used in their interactions.
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.
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.
Client
result Server
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.
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.