Chapter 1 - Introduction DS
Chapter 1 - Introduction DS
Introduction
1
Outlines
Introduction
Definition
Goals of a Distributed System
Types of Distributed Systems
2
Introduction
before the mid-80s:computers were
very expensive (hundred of thousands or even millions of
dollars)
very slow (a few thousand instructions per second)
not connected among themselves
After the mid-80s: two major developments
cheap and powerful microprocessor-based computers
appeared
computer networks
LANs at speeds ranging from 10 to 1000 Mbps (now even
10Gbps)
WANs at speed ranging from 64 Kbps to gigabits/sec
Consequence
feasibility of using a large network of computers to work for
3the same application; this is in contrast to the old centralized
systems where there was a single computer with its
Definition of a Distributed System
a distributed system is a collection of independent
computers that appears to its users as a single
coherent system computer (Tanenbaum& Van Steen)
This definition has two aspects:
hardware: autonomous machines
software: a single system view for the users
A distributed system is one that stops you getting
any work done when a machine you have never
even heard of crashes (Leslie)
A distributed system is one in which components
located at networked computers communicate and
coordinate their actions only by passing messages.
(George C.)
4
……Cont’d
A distributed system is a collection of
autonomous/independent computers, connected
through a network and distribution middleware,
which enables computers to coordinate their activities
(by passing messages) and to share the resources of
the system, so that users perceive the system as a
single coherent computing facility.
5
Advantages of Distributed Systems
Performance: Very often a collection of processors can
provide higher performance (and better
price/performance ratio) than a centralized computer.
Distribution: many applications involve, by their nature,
spatially separated machines (banking, commercial,
automotive system).
Reliability (fault tolerance): if some of the machines
crash, the system can survive.
Incremental growth: as requirements on processing
power grow, new machines can be added incrementally.
Sharing of data/resources: shared data is essential to
many applications (banking, computer supported
cooperative work, reservation systems); other resources
can be also shared (e.g. expensive printers).
Communication:
6 facilitates human-to-human
Disadvantages of Distributed Systems
Difficulties of developing distributed software:
how should operating systems, programming
languages and applications look like?
Networking problems: several problems are
created by the network infrastructure, which have to
be dealt with: loss of messages, overloading, ...
Security problems: sharing generates the problem
of data security.
7
Characteristics of Distributed Systems
Differences between the computers and the
ways they communicate are hidden from
users
Users and applications can interact with a
distributed system in a consistent and
uniform way regardless of location
Distributed systems should be easy to expand
and scale
A distributed system is normally continuously
available, even if there may be partial
failures
8
Goals of a Distributed System - Connect users and
resources
Easily connect (printers, computers, storage
facilities, data, files, Web pages, ...)..Some of the
reasons..
economics: sharing resources such as printers and
high-speed computers..
to collaborate and exchange information
groupware: software for collaborative editing,
teleconferencing, etc.
e-commerce: buying and selling goods
9
Goals of Distributed System - Transparency
A distributed system that is able to present itself
to users and applications as if it were only a
single computer system is said to be
transparent.
10
Different forms of transparency in a distributed
system
11
Goals of Distributed System - Openness
Openness is concerned with extensions and
improvements of distributed systems according to
standard rules that describe their syntax and
semantics.
Detailed interfaces of components need to be
published.
New components have to be integrated with existing
components.
Differences in data representation of interface types on
different processors (of different vendors) have to be
resolved.
Interoperability: components of different origin can
communicate
Portability: components work on different platforms
12
Goals of Distributed System - Scalability
A distributed system should be scalable; there are
three dimensions
size: adding more users and resources to the system
geographically: users and resources may be far
apart
administratively: should be easy to manage even if
it spans many administrative organizations
Scalability allows the system and applications to
expand in scale without change to the system
structure or the application algorithms.
Scalability Problems
But a scalable system may exhibit performance
Concept Example
problems services
Centralized A single server for all users
Centralized data A single on-line telephone book
Centralized algorithms Doing routing based on
complete
13 information
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 with high
latency and mostly unreliable links)
Three possible solutions:
Hiding communication latencies
Distribution and
Replication
14
A. Hide Communication Latencies
Try to avoid waiting for responses to remote service
requests
let the requester do other useful job rather than waiting
i.e., construct requesting applications that use only
asynchronous communication instead of synchronous
communication; when a reply arrives the application is
interrupted
good for batch processing and parallel applications since
independent tasks can be scheduled while another task is
waiting for communication to complete or use multi
threading for non-parallel programs.
hiding communication latencies is not in general
applicable for interactive applications
for interactive applications, try to reduce communication;
move
15 part of the job to the client to reduce
… Cont’d
16
B. Distribution
Means splitting a component into smaller parts and
spreading those parts across the system
e.g., DNS -Domain Name System ..divide the name space
into non over lapping zones
17
C. Replication
Replicate components across a distributed system to
increase availability and for load balancing, leading
to better performance
replication is 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
18
Pitfalls when Developing Distributed Systems
Because of false assumptions made by first time
developers (of distributed systems) which are related
to the properties of distributed systems and do not
occur in non distributed applications.
The network is reliable (making it difficult to
achieve failure transparency)
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
19
Types of Distributed System
Three main types:
Distributed computing systems
Focus on computation
Goal: High performance computing tasks
Distributed information systems
Focus on interoperability (the ability to exchange and
use information)
Goal: Distribute information across several servers
Distributed pervasive systems
Focus on mobile, embedded, communicating systems
Goal: Spread a real-life environment with a large variety
of smart devices
20
Distributed Computing Systems: Cluster Computing
Essentially a group of systems connected through a high
speed LAN.
Homogeneous: Same OS, near-identical hardware
Single managing node
Tightly coupled systems
A master node runs a middleware (containing libraries
for parallel programs) and controls other compute nodes
Centralized job management & scheduling system
21
Distributed Computing Systems: Grid Computing
Lots of nodes (including clusters across multiple subnets) from
everywhere.
Heterogeneous: no assumptions are made concerning
hardware, operating systems, networks, administrative
domains, security policies, etc.
Diversity and dynamism (it can handle nodes dropping in
and out at any point of time)
Dispersed across several organizations and can easily span
a wide-area network
To allow for collaborations, grids generally use virtual
organizations (grouping of users that will allow for
authorization on resource allocation).
Loosely coupled (decentralization)
Distributed job management & scheduling
22
Distributed Computing Systems: Cloud Computing
Web-based tools or applications that users can access and
use through a web browser as if it were a program
installed locally on their own computer.
Internet-based computing
offers dynamically scalable and virtualized resources
that make up services for users to use over the internet
The only thing the user's computer needs to be able to
run is the cloud computing system's interface software
23
Distributed Information Systems
Evolved in organizations that were confronted with a wealth of
networked applications, but for which interoperability turned out
to be problematic.
Many of the existing middleware solutions are the result of
working with an infrastructure in which it was easier to integrate
applications into an enterprise-wide information system. Several
levels at which integration took place:
a networked application simply consisted of a server running that
application (often including a database) and making it available to
remote programs, called clients.
Such clients could send a request to the server for executing a
specific operation, after which a response would be sent back.
Integration at the lowest level would allow clients to wrap a
number of requests, possibly for different servers, into a single
larger request and have it executed as a distributed transaction.
The key idea was that all, or none of the requests would be
executed.
24
Distributed Information Systems: Transaction processing systems
Focus on database applications - operations on a database
are usually carried out in the form of transactions.
special primitives are required to program transactions,
supplied either by the underlying distributed system or by the
language runtime system
Exact list of primitives depends on the type of application;
procedure calls, ordinary statements, etc. can also be
included
25
… Cont’d
Transaction between processes:
e.g., assume the following banking operation
withdraw an amount x from account 1
deposit the amount x to account 2
what happens if there is a problem after the first activity
is carried out?
group the two operations into one transaction; either
both are carried out or neither
we need a way to roll back when a transaction is not
completed
26
… Cont’d
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
27
are made permanent:
Distributed Pervasive Systems
The distributed systems discussed so far are characterized
by their stability; fixed nodes having high-quality
connection to a network
A next-generation of distributed systems emerging in
which the nodes are small, wireless, battery-powered,
mobile (e.g. PDAs, smart phones, wireless surveillance
cameras, portable ECG monitors, etc.), and often
embedded as part of a larger system.
Some requirements:
Contextual change: The system is part of an
environment in which changes should be immediately
accounted for.
Ad hoc composition: Each node may be used in a very
different ways by different users.
Requires ease-of-configuration.
28
Sharing is the default: Nodes come and go, providing
Distributed Pervasive Systems: Examples
Home Systems
built around home networks·
consist of one or more personal computers
integrate consumer electronics such as TVs, audio and video
equipment, gaming devices, (smart) phones, PDAs, and other
personal wearables into a single system.
Now/Soon: all kinds of devices such as kitchen appliances,
surveillance cameras, clocks, controllers for lighting, and so
on, will all be hooked up into a single distributed system.
Several challenges:
System should be completely self-configuring and self-
managing
e.g. Universal Plug and Play (UPnP) standards by which
devices automatically obtain IP addresses, can discover each
other, etc.
Unclear how software and firmware in devices can be easily
29
updated without manual intervention, or when updates do take
Distributed Pervasive Systems: Examples
Electronic health System
New devices are being developed to monitor the well-being of
individuals and to automatically contact physicians when
needed.
Major goal is to prevent people from being hospitalized.
Questions to be raised:
Where and how should monitored data be stored?
How can we prevent loss of crucial data?
What infrastructure is needed to generate and propagate alerts?
How can security be enforced?
How can physicians provide online feedback?
30
Distributed Pervasive Systems: Examples
Sensor Networks
Consists of spatially distributed autonomous sensors to
cooperatively monitor physical or environmental conditions,
such as temperature, sound, vibration, pressure, motion or
pollutants, etc.
The nodes to which sensors are attached are:
Many (10s-1000s)
Simple (i.e., hardly any memory, CPU power, or
communication facilities)
Often battery-powered (or even battery-less)
31
Related Concepts : Parallel Systems
Parallel Computing is a form of computation in which many
calculations are carried out simultaneously, operating on the
principle that large problems can often be divided into smaller
ones, which are then solved concurrently (in parallel).
In parallel computing, all processors have access to a shared
memory. Shared memory can be used to exchange information
between processors.
In distributed computing, each processor has its own private
memory (distributed memory). Information is exchanged by
passing messages between the processors.
32
Related Concepts : Centralized System
Centralized System Characteristics
One component with non-autonomous parts
Component shared by users all the time
All resources accessible
Software runs in a single process
Single point of control
Single point of failure
Distributed System Characteristics
Multiple autonomous components
Components are not shared by all users
Resources may not be accessible
Software runs in concurrent processes on different
processors
Multiple points of control
33 Multiple points of failure
Examples
Automatic Banking System
34
… Cont’d
Network of Workstations
35
… Cont’d
Internet - WWW
36