Vous êtes sur la page 1sur 38

Distributed Systems

Introduction

Prof. Dr.-Ing. Torben Weis


Universitt Duisburg-Essen
What is a Distributed System?

A distributed system is one in which (hardware


or software) components located at networked
computers communicate and coordinate their
actions only by passing messages.
(Coulouris, Dollimore, Kindberg)

"A distributed system is one on which I cannot


get any work done because some machine I
have never heard of has crashed.
(Leslie Lamport)

Universitt Duisburg-Essen Torben Weis 2


Verteilte Systeme
Why Distributed Systems?

Distribution
Physical Location
E.g. user data stored on remote server
Higher performance
E.g. cluster computing
Fault tolerance
E.g. backup server
Connection
Formerly isolated systems are connected
Additional functionality
E.g. World Wide Web
Universitt Duisburg-Essen Torben Weis 3
Verteilte Systeme
Characteristics of Distributed Systems

Parallel activities
Autonomous components executing concurrent tasks
Communication via message passing
No shared memory
Resource sharing
Printer, database, other services
No knowledge of global state
No single process can have knowledge of the current global
state of the system
No global clock
Only limited precision for processes to synchronize their
clocks
Universitt Duisburg-Essen Torben Weis 4
Verteilte Systeme
Differentiation

Multiprocessor systems
Shared memory
E.g. dual processor system

Multicomputer systems
No shared memory
Homogeneous in hard- and software
Massively Parallel Processors (MPP)
Workstation clusters
Heterogeneous
This is the scope of this lecture!

Universitt Duisburg-Essen Torben Weis 5


Verteilte Systeme
Business Example

Online bookstore (e.g. in the World Wide Web)


Customers can connect their computer to your
computer:
Browse your inventory
Place orders

Universitt Duisburg-Essen Torben Weis 6


Verteilte Systeme
Business Example Challenges

What if
Your customer uses a completely different hardware?
(PC, MAC, Android, )
a different operating system? (Windows, Linux, )
a different way of representing data? (ASCII, ISO
8859-1, UTF-16, )

Compatibility

Universitt Duisburg-Essen Torben Weis 7


Verteilte Systeme
Business Example Challenges (2)

What if
You want to move your business and computers to
the Caribbean (because of the weather)?
Your customer moves to the Caribbean (more likely)?

Distribution transparency
What if
Two customers want to order the same item at the
same time?

Concurrency

Universitt Duisburg-Essen Torben Weis 8


Verteilte Systeme
Business Example Challenges (3)

What if
The database with your inventory information
crashes?
Your customers computer crashes in the middle of an
order?

Fault tolerance

Universitt Duisburg-Essen Torben Weis 9


Verteilte Systeme
Business Example Challenges (4)

What if
Someone tries to break into your system to steal data?
sniffs for information?
your customer orders something and doesnt
accept the delivery saying he didnt?

Security
What if
You are so successful that millions of people are
visiting your online store at the same time?

Scalability
Universitt Duisburg-Essen Torben Weis 10
Verteilte Systeme
Business Example Challenges (5)

When building the system


Do you want to write the whole software on your own
(network, database,)?
For all end devices used by your customers?
What about updates, new technologies?

Reuse and Openness (Standards)

Universitt Duisburg-Essen Torben Weis 11


Verteilte Systeme
Overview Challenges

Compatibility
Heterogeneous components must be able to
interoperate

Distribution transparency
Distribution should be hidden from the user
Distributed system appears coherent to the user

Fault tolerance
Failure of a component (partial failure) should not
result in failure of the whole system

Universitt Duisburg-Essen Torben Weis 12


Verteilte Systeme
Overview Challenges (2)

Scalability
System should work efficiently with an increasing
number of users and orders
Concurrency
Shared access to resources must be possible
Openness
Interfaces should be publicly available to ease adding
new components
Security
The system should only be used in the way intended

Universitt Duisburg-Essen Torben Weis 13


Verteilte Systeme
Compatibility

Heterogeneous components must be able to


interoperate
Operating systems
Hardware architectures
Programming languages
Software interfaces
Security measures
Information representation

Universitt Duisburg-Essen Torben Weis 14


Verteilte Systeme
Distribution Transparency

Distributed system appears as coherent system


Location transparency
Hides the physical location of a resource
E.g. email addresses

Migration transparency
Hides that a resource has been moved
E.g. mailbox moves to another server

Relocation transparency
Hides that a resource has been moved while the
resource is in use
Universitt Duisburg-Essen Torben Weis 15
Verteilte Systeme
Distribution Transparency (2)

Access transparency
Access to local or remote resources is identical
E.g. Network File System

Replication transparency
Access to replicated resources as if there was just one
Failure transparency
Tasks can be completed despite failures
E.g. message retransmission

Universitt Duisburg-Essen Torben Weis 16


Verteilte Systeme
Distribution Transparency (3)

Concurrency transparency
A process should not notice that there are others
sharing the same resources

Persistence transparency
Masks the deactivation and reactivation of an object
E.g. application continues with a computation
although the process has been restarted

Transaction transparency
Hides the coordination required to satisfy the
transactional properties of operations

Universitt Duisburg-Essen Torben Weis 17


Verteilte Systeme
Fault Tolerance

Failure
An offered service no longer complies with its
specification, e.g. web server is not responsive

Fault
Cause of a failure, e.g. server hard disk crashed
A fault in the system is the failure of a component
E.g. hard disk fails its function due to fault in
magnetic head

Fault tolerance
No failure despite faults
Universitt Duisburg-Essen Torben Weis 18
Verteilte Systeme
Fault Tolerance Mechanisms

Fault detection
Checksums, heartbeat,

Fault masking
Retransmission of corrupt messages, redundancy,

Fault toleration
Exception handling, timeouts,

Fault recovery
Rollback mechanisms,

Universitt Duisburg-Essen Torben Weis 19


Verteilte Systeme
Scalability

System works efficiently when adding resources


and components
Capacity increases linearly or proportionally with
resource investment

Performance
1 server handles 1000 requests, 2 servers handle
2000 requests, etc.

Cost of physical resources


1 server costs 1000, 2 servers cost 2000 etc.

Universitt Duisburg-Essen Torben Weis 20


Verteilte Systeme
Scalability Mechanisms

Load balancing
Distribute work requests between components

Partitioning
Components are responsible for different parts

Replication
Copy resources to multiple components

Caching
Save resource temporarily after fetching it

Universitt Duisburg-Essen Torben Weis 21


Verteilte Systeme
Concurrency

Shared access to resources must be possible


Fair scheduling
Preserve dependencies (e.g. distributed
transactions)
Avoid deadlocks, lifelocks,

Universitt Duisburg-Essen Torben Weis 22


Verteilte Systeme
Openness

Standardized message format and behavior


Publicly documented interfaces
Interoperability:
Different implementations from different vendors
work together when adhering to the specification
Portability: applications run in different
environments with no or minor modification
Extensibility: easy to add new components
E.g. email or web are open systems
Skype or WhatsApp are closed systems
Universitt Duisburg-Essen Torben Weis 23
Verteilte Systeme
Openness

Open system:
... a system that implements sufficient open
specifications for interfaces, services, and
supporting formats to enable properly
engineered applications software to be ported
across a wide range of systems with minimal
changes, to interoperate with other applications
on local and remote systems, and to interact
with users in a style which facilitates user
portability (Guide to the POSIX Open Systems
Environment, IEEE POSIX 1003.0).

Universitt Duisburg-Essen Torben Weis 24


Verteilte Systeme
Security

The system may only be used in the way


intended
Confidentiality
Information accessible only for authorized users
E.g. encrypted wireless network

Integrity
No corruption or alteration of data
E.g. intact account number in a money transfer

Universitt Duisburg-Essen Torben Weis 25


Verteilte Systeme
Security (2)

Authenticity
Data comes from its originator
E.g. signed message

Non-repudiation
Proof of sending / receiving an information
E.g. signed message

Availability
Access to resources must always be possible
E.g. despite of denial of service attack

Universitt Duisburg-Essen Torben Weis 26


Verteilte Systeme
Security Mechanisms

Encryption
E.g. AES, RSA

Digital signatures
E.g. RSA, ECDSA

Authentication
E.g. password, public-key authentication

Authorization
E.g. access control lists

Universitt Duisburg-Essen Torben Weis 27


Verteilte Systeme
Types of Distributed Systems

Client-server systems
Cloud computing systems
Distributed computing systems
Cluster computing
Grid computing

Peer-to-peer systems
Pervasive systems

Universitt Duisburg-Essen Torben Weis 28


Verteilte Systeme
Client-Server Systems

Service: functionality accessed by an application


or another component
E.g. online bookstore service

The process offering the service is called Server


A server is a running computer program, not machine
The computer running a server is called Host
Note: Hosts are also colloquially called server

The process using the service is called Client

Universitt Duisburg-Essen Torben Weis 29


Verteilte Systeme
Client-Server Systems (2)

Client request
reply
Server
request
reply
Client
Computer
Process

Universitt Duisburg-Essen Torben Weis 30


Verteilte Systeme
Client-Server Systems (3)

History
Development driven by new hardware (e.g. PCs and
Ethernet)
Replaced monolithic mainframe time-sharing
applications and dumb terminals
Motivation
Server provides access to shared resources
Database, files, printers,
Client on (cheap) workstations relies on server
Less application logic, mainly information presentation

Universitt Duisburg-Essen Torben Weis 31


Verteilte Systeme
Client-Server Systems (4)

Advantages
Easy to set up
Easy to manage
Problems
Server is the weak point (scalability, security)

More complex architectures:


Distribute service on multiple servers
Multi-tiered architectures (a server acts as client to
another server, e.g. web server queries database
server)

Universitt Duisburg-Essen Torben Weis 32


Verteilte Systeme
Cloud Computing Systems

request
Client Server
reply

Client accesses server that runs in a cloud


The actual host or infrastructure is not visible to the
user or application
Cloud provider saves costs by virtualization and
sharing hardware between customers
Different service models, e.g. Infrastructure as a
Service (virtual machine)
Hot topic in industry and research
Universitt Duisburg-Essen Torben Weis 33
Verteilte Systeme
Cluster Computing Systems

Computers connected to a computer cluster


Purpose: supercomputing with commodity
hardware
Managed by one authority in one physical
location
Easy to control, reliable network

Usually runs one application at a time


Most supercomputers are computer clusters

Universitt Duisburg-Essen Torben Weis 34


Verteilte Systeme
Grid Computing Systems

Idea: make computing power an easily


accessible resource like an electric power grid
Virtual computer cluster
Heterogeneous hardware managed by different
authorities at different locations

Usually runs several applications from different


users at a time
Challenges: scheduling, partitioning

May involve dedicated computer hardware or


end user devices (e.g. Seti@home, BOINC)
Universitt Duisburg-Essen Torben Weis 35
Verteilte Systeme
Peer-to-Peer Systems

Peer
Peer
Peer
Peer

Users share their resource among each other


No clear distinction between clients and servers
All participants are peers

Peers connect to an overlay network on top of


the existing network
Universitt Duisburg-Essen Torben Weis 36
Verteilte Systeme
Pervasive Systems

Distributed systems that pervasively integrate


into the users environment
E.g. home systems that control electronics
subject to the user location and activity
E.g. sensor networks that collect data about
weather, traffic, industrial machinery,
E.g. personal health monitoring (smartwatches
and other wearables)
Hot topic in research

Universitt Duisburg-Essen Torben Weis 37


Verteilte Systeme
How to develop Distributed Systems?

Define system goal and requirements


Sketch system architecture
Small project: start programming
Large project: software & system engineering
Specify functions, components
Develop system design
Implement, document
Write and perform tests
Refine software by repeating above steps iteratively
Universitt Duisburg-Essen Torben Weis 38
Verteilte Systeme

Vous aimerez peut-être aussi