38
Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Embed Size (px)

Citation preview

Page 1: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Distributed Systems: Concepts and Design

Edition 5, © Addison-Wesley 2012

Chapter 1 Characterization of Distributed Systems

Page 2: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

DISTRIBUTED SYSTEMS (Essential Issue)

A distributed system is:A collection of independent computers that appears to

its users as a single coherent system.

Another Definition

A distributed system is a collection of autonomous

computers linked by a computer network that appear to

the users of the system as a single computer.

2

Page 3: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Distributed Systems 3

Introduction

Distributed SystemsMultiple independent computers that appear as one

Lamport’s Definition“ You know you have one when the crash of a computer you have never heard of

stops you from getting any work done.”

“A number of interconnected autonomous computers that provide services to meet the information processing needs of modern enterprises.”

Page 4: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

4

Key Issue

Concurrency:In a network of computers, concurrent program

execution is the norm.

No global clock:

When programs need to cooperate they coordinate their actions by exchanging messages. (a direct consequence of the fact that the only communication is by sending messages through a network.)

Independent failures:

Faults in the network result in the isolation of the computers that are connected to it, but that doesn’t mean that they stop running.

Page 5: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

5

Characteristics of DS

How it works is hidden from user.

Interaction is consistent & uniform

Scalability

Continuously available, even if some parts are out of order

Page 6: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

6

DS Layered Architecture

Commonly implemented through layers & middleware

Page 7: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

7

DS Goals

Make Resources Available

Hide the fact that resources are distributedDistribution Transparency

Be Open

Be Scalable

- coordinate their activities

- share resources: hardware, software, data.

Page 8: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Make Resources Available

E.g. Printers, storage facilities, data, files, webpages, networks etc.

For economic reasons

For collaboration reasons

To create virtual organisations

This produces challengesSecurity

Privacy

Page 9: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Distributed Systems 9

Examples of Distributed Systems

Transactional applications - Banking systems

Manufacturing and process control

Inventory systems

General purpose (university, office automation)

Communication – email, IM, VoIP, social networks

Distributed information systems WWW

Cloud Computing Infrastructures

Federated and Distributed Databases

Page 10: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

10Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

Selected application domains and associated networked applications

Finance and commerce eCommerce e.g. Amazon and eBay, PayPal, online banking and trading

The information society Web information and search engines, ebooks, Wikipedia; social networking: Facebook and MySpace.

Creative industries and entertainment

online gaming, music and film in the home, user-generated content, e.g. YouTube, Flickr

Healthcare health informatics, on online patient records, monitoring patients

Education e-learning, virtual learning environments; distance learning

Transport and logistics GPS in route finding systems, map services: Google Maps, Google Earth

Science The Grid as an enabling technology for collaboration between scientists

Environmental management sensor technology to monitor earthquakes, floods or tsunamis

Page 11: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

11Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

An example financial trading system

Page 12: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

intranet

ISP

desktop computer:

backbone

satellite link

server:

network link:

A typical portion of the Internet

Page 13: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

Portable and handheld devices in a distributed system

Page 14: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

14Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

Cloud computing

Page 15: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

Growth of the Internet (computers and web servers)

Date Computers Web servers Percentage

1993, July 1,776,000 130 0.008

1995, July 6,642,000 23,500 0.4

1997, July 19,540,000 1,203,096 6

1999, July 56,218,000 6,598,697 122001, July 125,888,197 31,299,592 25

42,298,3712003, July

2005, July

~200,000,000

353,284,187 67,571,581

21

19

Page 16: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

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).

16

Page 17: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

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.

17

Page 18: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Distributed Systems Challenges

Design issues that arise specifically from the distributed nature of the application:

• Transparency

• Communication

• Performance & scalability

• Heterogeneity

• Openness

• Reliability & fault tolerance

• Security

18

Page 19: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Transparency in a Distributed System

An important goal of distributed systems is to hide the fact that processe s / resources are physically distributed Enabling users to use the system

without worrying about where the resources are.

Transparency Description

AccessHide differences in data representation and how a resource is accessed

Location Hide where a resource is located

Migration Hide that a resource may move to another location

RelocationHide that a resource may be moved to another location while in use

ReplicationHide that a resource may be shared by several competitive users

ConcurrencyHide that a resource may be shared by several competitive users

Failure Hide the failure and recovery of a resource

PersistenceHide whether a (software) resource is in memory or on disk

Page 20: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

Transparencies

Access transparency: enables local and remote resources to be accessed using identical operations.Location transparency: enables resources to be accessed without knowledge of their physical or network location (for example, which building or IP address).Concurrency transparency: enables several processes to operate concurrently using shared resources without interference between them.Replication transparency: enables multiple instances of resources to be used to increase reliability and performance without knowledge of the replicas by users or application programmers.Failure transparency: enables the concealment of faults, allowing users and application programs to complete their tasks despite the failure of hardware or software components.Mobility transparency: allows the movement of resources and clients within a system without affecting the operation of users or programs.Performance transparency: allows the system to be reconfigured to improve performance as loads vary.Scaling transparency: allows the system and applications to expand in scale without change to the system structure or the application algorithms.

Page 21: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Access Transparency

Different Resources may represent data in different formats, but this shouldn’t be an issue for the user.

A user on an Intel workstation sending data to a Sun SPARC machine, shouldn’t be concerned that Intel orders its bytes by little endian format (high order bytes first) while SPARC uses big endian format (low order bytes first).

Different file naming formats should also not be of concern to the user. ‘/’ or ‘\’.

Page 22: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Location Transparency

Location Transparency refers to the physical position of a resource, which should be hidden from the user. This is normally achieved through naming, where normally only logical names are used;

http://cis.payap.ac.th/index.php

Where is it (physically)?

Has it always been there?

Page 23: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Migration / Relocation Transparency

In the previous web address, you have no idea whether index.html has always been on the cis.payap.ac.th server, or when it might have moved there. If resources can be moved without affecting the way the resource is accessed then migration transparency is provided. If that movement occurs while the resource is being accessed, then relocation transparency is provided. Consider moving around using a wireless laptop.

Page 24: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Replication Transparency

The efficiency of distributed systems can be improved greatly by locating replicas (copies) of a resources physically closer to a user. Replication transparency enables the system to do this, without the user knowing they are using a replica.

Page 25: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Concurrency Transparency

A goal of distributed systems is often sharing of resources between users. These users may wish to access or even update the same data at the same time (concurrently). An important challenge when designing distributed systems is how to deal with concurrent accesses.

How to maintain consistency when different users use the same resource in different ways.

Page 26: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Failure Consistency

“You know you have one when the crash of a computer you’ve never heard of stops you from getting any work done!”

Failure Consistency tries to mask failures such as this.

It is difficult to identify between a resource that has failed and a resource which is performing badly (slowly).

Consider opening a webpage - is it dead or painfully slow, how long should the browser wait?

Page 27: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Complete Transparency?

Complete Transparency isn’t always completely necessary.

E.g. daily newspaper arriving at 7am regardless of location in the world.

Nor is it always possible.Physics behind signal transmission.

Page 28: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Scalability

A further goal of Distributed Systems is that they should be scalable - that is that they can grow;

Scalable by size; more users or resources can be added to the system.

Scalable by location; resources and users may be physically distant.

Scalable by administration; system can be easily manageable as it grows.

Page 29: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Scalability

One problem often encountered when dealing with scalability is dealing with centralisation.

Centralised services

Centralised data

Centralised algorithms

Imagine how the internet would work if there was only one single DNS table, and every address resolution request had to be directed through that computer.

Page 30: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Scalability

Another problem affecting scalability concerns whether synchronous communication is actually possible.

Many existing systems were designed for synchronous communication.

The laws of physics (including the speed of light), limits the speed of communication between physically distant resources.

Leaving a ‘client’ blocked until a reply is sent back.

Page 31: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Scalability & Administration

What happens when a system needs to scale across multiple, independent adminstrative domains?

Conflicting policiesResource Usage

Management

Security

Page 32: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Solving Scalability (briefly & currently)

Hiding Communication LatenciesEssentially asynchronous communication. Not waiting for a reply, instead

creating a special handler (thread) to complete previous requests.

DistributionSplitting a component into smaller parts – e.g. DNS, splits .com, .th, .edu etc.

ReplicationFor example caching. A copy of the data closer to the request.

Page 33: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Replication & Scalability

Replication can have a downside effect on ScalabilityConsistency Problems

How big a problem is this?

Page 34: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Scalability Problems

Examples of scalability limitations.

Concept Example

Centralized services A single server for all users

Centralized data A single on-line telephone book

Centralized algorithmsDoing routing based on complete information

Page 35: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Scaling Techniques (1)

1.4

The difference between letting:

a) a server or

b) a client check forms as they are being filled

Page 36: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Scaling Techniques (2)

1.5

An example of dividing the DNS name space into zones.

Page 37: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Communication

37

Components of a distributed system have to communicate in order to interact. This impliessupport at two levels:1. Networking infrastructure (interconnections & network software).2. Appropriate communication primitives and models and their implementation:• communication primitives:- send- receive- remote procedure call (RPC)• communication models- client-server communication: implies a message exchange between two processes: the process which requests a service and the one which provides it;- group muticast: the target of a message is a set of processes, which are members ofa given group.

Page 38: Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

Case StudyWeb servers and web browsers

Internet

BrowsersWeb servers

www.google.com

www.cdk5.net

www.w3c.org

standards

faq.html

http://www.w3.org/standards/faq.html#conformance

http://www.google.comlsearch?q=obama

http://www.cdk5.net/

File system ofwww.w3c.org