Institution of Technology School of Computing Department of Information Technology and Computer Science
Institution of Technology School of Computing Department of Information Technology and Computer Science
Institution of Technology School of Computing Department of Information Technology and Computer Science
School of Computing
Department of Information Technology and computer
science
Introduction to Distributed System
COSc419
1
Introduction
2/
Introduction Definition
Network
3/
Introduction Definition
Other Definitions
A distributed system is a system designed to support the development of
applications and services which can exploit a physical architec- ture
consisting of multiple, autonomous processing elements that do not
share primary memory but cooperate by sending asynchronous
messages over a communication (Blair & Stefani)
network
4/
Introduction Why Distributed
Why Distributed?
5/
Introduction Characteristics of DS
6/
Introduction Goals of Distributed System
7/
Introduction Goals of Distributed System
Distribution transparency
A distributed system that is able to present itself to users and applications as
if
it wereTransp.
only a singleDescription
computer system is said to be transparent
Access Hide differences in data representation and how an
object is accessed
Location Hide where an object is located
Relocation Hide that an object may be moved to another location
while in use
Migration Hide that an object may move to another location
Replication Hide that an object is replicated
Concurrency Hide that an object may be shared by several
independent users
Failure Hide the failure and recovery of an object
Note
Distribution transparency is a nice a goal, but achieving it is a different
story.
8/
Introduction Goals of Distributed System
Distribution transparency
A distributed system that is able to present itself to users and applications as
if
it wereTransp.
only a singleDescription
computer system is said to be transparent
Access Hide differences in data representation and how an
object is accessed
Location Hide where an object is located
Relocation Hide that an object may be moved to another location
while in use
Migration Hide that an object may move to another location
Replication Hide that an object is replicated
Concurrency Hide that an object may be shared by several
independent users
Failure Hide the failure and recovery of an object
Note
Distribution transparency is a nice a goal, but achieving it is a different
story.
8/
Introduction Goals of Distributed System
Degree of transparency
Observation
Aiming at full distribution transparency may be too
much:
Users may be located in different continents
Completely hiding failures of networks and nodes is (theoretically and
practically) impossible
You cannot distinguish a slow computer from a failing one
You can never be sure that a server actually performed an operation before a
crash
Full transparency will cost performance, exposing distribution of the system
Keeping Web caches exactly up-to-date with the master
Immediately flushing write operations to disk for fault
tolerance
9/
Introduction Goals of Distributed System
Degree of transparency
Observation
Aiming at full distribution transparency may be too
much:
Users may be located in different continents
Completely hiding failures of networks and nodes is (theoretically and
practically) impossible
You cannot distinguish a slow computer from a failing one
You can never be sure that a server actually performed an operation before a
crash
Full transparency will cost performance, exposing distribution of the system
Keeping Web caches exactly up-to-date with the master
Immediately flushing write operations to disk for fault
tolerance
9/
Introduction Goals of Distributed System
Degree of transparency
Observation
Aiming at full distribution transparency may be too
much:
Users may be located in different continents
Completely hiding failures of networks and nodes is (theoretically and
practically) impossible
You cannot distinguish a slow computer from a failing one
You can never be sure that a server actually performed an operation before a
crash
Full transparency will cost performance, exposing distribution of the system
Keeping Web caches exactly up-to-date with the master
Immediately flushing write operations to disk for fault
tolerance
9/
Introduction Goals of Distributed System
Degree of transparency
Observation
Aiming at full distribution transparency may be too
much:
Users may be located in different continents
Completely hiding failures of networks and nodes is (theoretically and
practically) impossible
You cannot distinguish a slow computer from a failing one
You can never be sure that a server actually performed an operation before a
crash
Full transparency will cost performance, exposing distribution of the system
Keeping Web caches exactly up-to-date with the master
Immediately flushing write operations to disk for fault
tolerance
9/
Introduction Goals of Distributed System
10 /
Introduction Goals of Distributed System
11 / 42
Introduction Goals of Distributed System
Scaling Techniques
How to solve scaling problems
The problem is mainly performance, and arises as a result of limitations
in the capacity of servers and networks (for geographical scalability)
Three possible solutions: hiding communication latencies, distribution,
and replication
13 /
Introduction Goals of Distributed System
14 /
Introduction Goals of Distributed System
Distribution
Partition data and computations across multiple
machines:
Move computations to clients (Java applets)
Decentralized naming services (DNS)
Decentralized information systems (WWW)
16 /
Introduction Goals of Distributed System
Replication/caching
Replicate components across a distributed system to increase
availability and for load balancing, leading to better performance
Replicated file servers and databases
Mirrored Web sites
decided by the owner of a resource
caching (a special form of replication) also reduces
communication latency; decided by the user
but, caching and replication may lead to consistency problems (see
Chapter 6 - Consistency and Replication)
Web caches (in browsers and
proxies) File caching (at server and
client)
17 /
Introduction Goals of Distributed System
Observation
Many distributed systems are needlessly complex caused by mistakes
that required patching later on. There are many false assumptions:
The network is reliable
The network is secure
The network is homogeneous
The topology does not change
Latency is zero
Bandwidth is infinite
Transport cost is zero
There is one administrator
18 /
Introduction Goals of Distributed System
Observation
Many distributed systems are needlessly complex caused by mistakes
that required patching later on. There are many false assumptions:
The network is reliable
The network is secure
The network is homogeneous
The topology does not change
Latency is zero
Bandwidth is infinite
Transport cost is zero
There is one administrator
18 /
Introduction Goals of Distributed System
Observation
Many distributed systems are needlessly complex caused by mistakes
that required patching later on. There are many false assumptions:
The network is reliable
The network is secure
The network is homogeneous
The topology does not change
Latency is zero
Bandwidth is infinite
Transport cost is zero
There is one administrator
18 /
Introduction Goals of Distributed System
Observation
Many distributed systems are needlessly complex caused by mistakes
that required patching later on. There are many false assumptions:
The network is reliable
The network is secure
The network is homogeneous
The topology does not change
Latency is zero
Bandwidth is infinite
Transport cost is zero
There is one administrator
18 /
Introduction Goals of Distributed System
Observation
Many distributed systems are needlessly complex caused by mistakes
that required patching later on. There are many false assumptions:
The network is reliable
The network is secure
The network is homogeneous
The topology does not change
Latency is zero
Bandwidth is infinite
Transport cost is zero
There is one administrator
18 /
Introduction Goals of Distributed System
Observation
Many distributed systems are needlessly complex caused by mistakes
that required patching later on. There are many false assumptions:
The network is reliable
The network is secure
The network is homogeneous
The topology does not change
Latency is zero
Bandwidth is infinite
Transport cost is zero
There is one administrator
18 /
Introduction Goals of Distributed System
Observation
Many distributed systems are needlessly complex caused by mistakes
that required patching later on. There are many false assumptions:
The network is reliable
The network is secure
The network is homogeneous
The topology does not change
Latency is zero
Bandwidth is infinite
Transport cost is zero
There is one administrator
18 /
Introduction Goals of Distributed System
Observation
Many distributed systems are needlessly complex caused by mistakes
that required patching later on. There are many false assumptions:
The network is reliable
The network is secure
The network is homogeneous
The topology does not change
Latency is zero
Bandwidth is infinite
Transport cost is zero
There is one administrator
18 /
Introduction Goals of Distributed System
Observation
Many distributed systems are needlessly complex caused by mistakes
that required patching later on. There are many false assumptions:
The network is reliable
The network is secure
The network is homogeneous
The topology does not change
Latency is zero
Bandwidth is infinite
Transport cost is zero
There is one administrator
18 /
Introduction Types of distributed systems
19 /
Introduction Types of distributed
systems
20 /
Introduction Types of distributed
systems
21 /
Introduction Types of distributed
systems
25 /
Introduction Types of distributed
systems
26 /
Introduction Types of distributed
systems
27 /
Introduction Types of distributed
systems
29 /
Introduction Types of distributed
systems
29 /
Introduction Types of distributed
systems
30 /
Introduction Types of distributed
systems
Model
A transaction is a collection of operations on the state of an object (database,
object composition, etc.) that satisfies the following properties (ACID)
Atomicity: All operations either succeed, or all of them fail. When the transaction
fails, the state of the object will remain unaffected by the transaction.
Consistency: A transaction establishes a valid state transition. This does not
exclude
the possibility of invalid, intermediate states during the transaction’s execution.
Isolation: Concurrent transactions do not interfere with each other. It appears to
each transaction T that other transactions occur either before T , or after T , but
never both.
Durability: After the execution of a transaction, its effects are made permanent:
changes to the state survive failures.
31 /
Introduction Types of distributed
systems
Model
A transaction is a collection of operations on the state of an object (database,
object composition, etc.) that satisfies the following properties (ACID)
Atomicity: All operations either succeed, or all of them fail. When the transaction
fails, the state of the object will remain unaffected by the transaction.
Consistency: A transaction establishes a valid state transition. This does not
exclude
the possibility of invalid, intermediate states during the transaction’s execution.
Isolation: Concurrent transactions do not interfere with each other. It appears to
each transaction T that other transactions occur either before T , or after T , but
never both.
Durability: After the execution of a transaction, its effects are made permanent:
changes to the state survive failures.
31 /
Introduction Types of distributed
systems
Model
A transaction is a collection of operations on the state of an object (database,
object composition, etc.) that satisfies the following properties (ACID)
Atomicity: All operations either succeed, or all of them fail. When the transaction
fails, the state of the object will remain unaffected by the transaction.
Consistency: A transaction establishes a valid state transition. This does not
exclude
the possibility of invalid, intermediate states during the transaction’s execution.
Isolation: Concurrent transactions do not interfere with each other. It appears to
each transaction T that other transactions occur either before T , or after T , but
never both.
Durability: After the execution of a transaction, its effects are made permanent:
changes to the state survive failures.
31 /
Introduction Types of distributed
systems
Model
A transaction is a collection of operations on the state of an object (database,
object composition, etc.) that satisfies the following properties (ACID)
Atomicity: All operations either succeed, or all of them fail. When the transaction
fails, the state of the object will remain unaffected by the transaction.
Consistency: A transaction establishes a valid state transition. This does not
exclude
the possibility of invalid, intermediate states during the transaction’s execution.
Isolation: Concurrent transactions do not interfere with each other. It appears to
each transaction T that other transactions occur either before T , or after T , but
never both.
Durability: After the execution of a transaction, its effects are made permanent:
changes to the state survive failures.
31 /
Introduction Types of distributed
systems
Model
A transaction is a collection of operations on the state of an object (database,
object composition, etc.) that satisfies the following properties (ACID)
Atomicity: All operations either succeed, or all of them fail. When the transaction
fails, the state of the object will remain unaffected by the transaction.
Consistency: A transaction establishes a valid state transition. This does not
exclude
the possibility of invalid, intermediate states during the transaction’s execution.
Isolation: Concurrent transactions do not interfere with each other. It appears to
each transaction T that other transactions occur either before T , or after T , but
never both.
Durability: After the execution of a transaction, its effects are made permanent:
changes to the state survive failures.
31 /
Introduction Types of distributed
systems
Classification of Transactions
A transaction could be flat, nested or
distributed
Flat Transaction
Consists of a series of operations that satisfy the ACID properties
Simple and widely used but with some limitations
Do not allow partial results to be committed or
aborted
i.e., atomicity is also partly a weakness
In our airline reservation example, we may want to
accept the first two reservations and find an
alternative one for the last
Some transactions may take too much time
32 /
Introduction Types of distributed
systems
Nested Transaction
Constructed from a number of sub transactions; it is
logically decomposed into a hierarchy of sub transactions
The top-level transaction forks off children that run in
parallel, on different machines; to gain performance or for
programming simplicity
Each may also execute one or more sub transactions
Permanence (durability) applies only to the top-level transaction;
commits by children should be undone
33 /
Introduction Types of distributed
systems
Distributed Transaction
A flat transaction that operates on data that are distributed
across multiple machines
Problem: separate algorithms are needed to handle the locking
of data and committing the entire transaction; see later in
Chapter 8 for distributed commit
34 /
Introduction Types of distributed
systems
LJ f D
Airline database otel database
Distributed dat abase
T-M> different (independent) T'M> physically separated
databases parts of the same
database
(a) (b)
36 /
Introduction Types of distributed
systems
Result:
Middleware as a communication facilitator in enterprise
application integration.
Client Client
application application
Communication middleware
Observation
Emerging next-generation of distributed systems in which nodes are small,
mobile, and often embedded in a larger system, characterized by the fact
that the system naturally blends into the user’s environment.
38 /
Introduction Types of distributed
systems
Observation
Emerging next-generation of distributed systems in which nodes are small,
mobile, and often embedded in a larger system, characterized by the fact
that the system naturally blends into the user’s environment.
38 /
Introduction Types of distributed
systems
Observation
Emerging next-generation of distributed systems in which nodes are small,
mobile, and often embedded in a larger system, characterized by the fact
that the system naturally blends into the user’s environment.
38 /
Introduction Types of distributed
systems
Observation
Emerging next-generation of distributed systems in which nodes are small,
mobile, and often embedded in a larger system, characterized by the fact
that the system naturally blends into the user’s environment.
38 /
Introduction Types of distributed
systems
Basic characteristics
(Distribution) Devices are networked, distributed, and accessible in
a transparent manner
(Interaction) Interaction between users and devices is highly
unobtrusive (Context awareness) The system is aware of a user’s
context in order to optimize interaction
(Autonomy) Devices operate autonomously without human
intervention, and are thus highly self-managed
(Intelligence) The system as a whole can handle a wide range of
dynamic actions and interactions
39 /
Introduction Types of distributed
systems
Basic characteristics
(Distribution) Devices are networked, distributed, and accessible in
a transparent manner
(Interaction) Interaction between users and devices is highly
unobtrusive (Context awareness) The system is aware of a user’s
context in order to optimize interaction
(Autonomy) Devices operate autonomously without human
intervention, and are thus highly self-managed
(Intelligence) The system as a whole can handle a wide range of
dynamic actions and interactions
39 /
Introduction Types of distributed
systems
Basic characteristics
(Distribution) Devices are networked, distributed, and accessible in
a transparent manner
(Interaction) Interaction between users and devices is highly
unobtrusive (Context awareness) The system is aware of a user’s
context in order to optimize interaction
(Autonomy) Devices operate autonomously without human
intervention, and are thus highly self-managed
(Intelligence) The system as a whole can handle a wide range of
dynamic actions and interactions
39 /
Introduction Types of distributed
systems
Basic characteristics
(Distribution) Devices are networked, distributed, and accessible in
a transparent manner
(Interaction) Interaction between users and devices is highly
unobtrusive (Context awareness) The system is aware of a user’s
context in order to optimize interaction
(Autonomy) Devices operate autonomously without human
intervention, and are thus highly self-managed
(Intelligence) The system as a whole can handle a wide range of
dynamic actions and interactions
39 /
Introduction Types of distributed
systems
Basic characteristics
(Distribution) Devices are networked, distributed, and accessible in
a transparent manner
(Interaction) Interaction between users and devices is highly
unobtrusive (Context awareness) The system is aware of a user’s
context in order to optimize interaction
(Autonomy) Devices operate autonomously without human
intervention, and are thus highly self-managed
(Intelligence) The system as a whole can handle a wide range of
dynamic actions and interactions
39 /
Introduction Types of distributed
systems
Observation
Mobile computing systems are generally a subclass of ubiquitous
computing systems and meet all of the five requirements.
Typical characteristics
Many different types of mobile divices: smart phones, remote
controls, car equipment, and so on
Wireless communication
Devices may continuously change their location ⇒
setting up a route may be problematic, as routes can change
frequently devices may easily be temporarily disconnected ⇒
disruption-tolerant networks
40 /
Introduction Types of distributed systems
Sensor networks
Characteristics
The nodes to which sensors are attached
are:
Many (10s-1000s)
Simple (small memory/compute/communication
capacity)
Often battery-powered (or even battery-less)
41 /
Introduction Types of distributed
systems
Sensor network
Operator's site
Sensor data is
sent directly to
operator
(a)
Sensors
send only
answers
(b) 42 /
End of chapter one
Question please
Thank you !
Any ?
40 /
End of chapter one
Quiz
1. What is Distributed system ? 1 mark]
2. Briefly describe the difference between
Grid computing and cluster computing ? 1 mark]
3. What is middleware in distributed system? 1 mark]
40 /