1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

32
1DT066 Distribuerade Informationssystem Distribuerade System Karaktäristik och Design 1

Transcript of 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Page 1: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

1DT066Distribuerade Informationssystem

Distribuerade System

Karaktäristik och Design

1

Page 2: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Outline

1. What is a Distributed System2. Examples of Distributed Systems3. Common Characteristics4. Basic Design Issues5. Summary

2

Page 3: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

What is a Distributed System?

Definition: A distributed system is one in which components located at networked computers communicate and coordinate their actions only by passing messages. This definition leads to the following characteristics of distributed systems:

Concurrency of components Lack of a global ‘clock’ Independent failures of components ‘acceptable’

3

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 17

Page 4: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

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

4

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 24-30

Page 5: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

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

Multiple points of failure5

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 24-30

Page 6: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Example On Distributed System: Local Area Network

the rest of

email server

Web server

Desktopcomputers

File server

router/firewall

print and other servers

other servers

print

Local areanetwork

email server

the Internet

6

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 24-30

Page 7: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Common Characteristics

What are we trying to achieve when we construct a distributed system?

Certain common characteristics can be used to assess distributed systems Heterogeneity Openness Security Scalability Failure Handling Concurrency Transparency

7

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 30-40,

Page 8: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Heterogeneity Variety and differences in

Networks Computer hardware Operating systems Programming languages Implementations by different developers

Middleware as software layers to provide a programming abstraction as well as masking the heterogeneity of the underlying networks, hardware, OS, and programming languages (e.g., CORBA).

Mobile Code to refer to code that can be sent from one computer to another and run at the destination (e.g., Java applets and Java virtual machine).

8

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 30-40

Page 9: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Openness

Openness is concerned with extensions and improvements of distributed systems.

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.

9

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 30-40

Page 10: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Security In a distributed system, clients send requests to

access data managed by servers, resources in the networks: Doctors requesting records from hospitals Users purchase products through electronic commerce

Security is required for: Concealing the contents of messages: security and

privacy Identifying a remote user or other agent correctly

(authentication) New challenges:

Denial of service attack Security of mobile code

10

CDKB, pp 30-40

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

Page 11: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Scalability

Adaptation of distributed systems to accommodate more users respond faster (this is the hard one)

Usually done by adding more and/or faster processors.

Components should not need to be changed when scale of a system increases.

Design components to be scalable!

11

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

CDKB, pp 30-40

Page 12: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Failure Handling (Fault Tolerance)

Hardware, software and networks fail!

Distributed systems must maintain availability even at low levels of hardware/software/network reliability.

Fault tolerance is achieved by recovery redundancy

12

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 30-40

Page 13: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Failure Types in Distributed Systems

13

Class of Failure Affects DescriptionClock Process Process’s local clock exceeds the bounds on its

rate of drift from real time.Performance Process Process exceeds the bounds on the interval

between two steps.Performance Channel A message’s transmission takes longer than the

stated bound.

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 83-87

Page 14: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Failure Types in Distributed Systems

14

Class of failure Affects DescriptionFail-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(Byzantine)

Process orchannel

Process/channel exhibits arbitrary behaviour: it maysend/transmit arbitrary messages at arbitrary times,commit omissions; a process may stop or take anincorrect step.

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 83-87

Page 15: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Concurrency

Components in distributed systems are executed in concurrent processes.

Components access and update shared resources (e.g. variables, databases, device drivers).

Integrity of the system may be violated if concurrent updates are not coordinated. Lost updates Inconsistent analysis

15

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 38-40

Page 16: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Transparency

Distributed systems should be perceived by users and application programmers as a whole rather than as a collection of cooperating components.

Transparency has different aspects.

These represent various properties that distributed systems should have.

16

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 39-40

Page 17: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Basic Design Issues

General software engineering principles include rigor and formality, separation of concerns, modularity, abstraction, anticipation of change, …

Specific issues for distributed systems:NamingCommunicationSoftware structureSystem architectureWorkload allocationConsistency maintenance

17

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 56-57

Page 18: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Naming

A name is resolved when translated into an interpretable form for resource/object reference. Communication identifier (IP address + port number) Name resolution involves several translation steps

Design considerations Choice of name space for each resource type Name service to resolve resource names to comm. id.

Name services include naming context resolution, hierarchical structure, resource protection

18

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 56-57

Page 19: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Communication Separated components communicate with sending

processes and receiving processes for data transfer and synchronization.

Message passing: send and receive primitives synchronous or blocking asynchronous or non-blocking Abstractions defined: channels, sockets, ports.

Communication patterns: client-server communication (e.g., RPC, function shipping) and group multicast

19

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 58-66

Page 20: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Consistency and Ordering of Events

Messages take different times to reach the other components. When a message reach the destination it may be invalid at the

sender There is normally no global consistent state in a distributed

system. A component may send its state to all other components. There is no guarantee that the state has reached all component The sender state may change its state before the old state has arrived.

Two messages from different components may arrive in different order at other component.

Two components cannot “see the same time”. When consistent states are needed protocols for synchronization

is used. Quiz – what is the crucial shared state of TCP? How is it kept

consistent?20

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 77-83

Page 21: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Ordering of Events

21

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 77-83

Page 22: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Software Structure

Layers in centralized computer systems:

22

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 67-68

Page 23: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Software Structure Layers and dependencies in distributed systems:

Applications

Distributed programmingsupport

Openservices

Open system kernel services

Computer and network hardware

23

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 67-68

Page 24: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

SYSTEM ARCHITECTURES

Client-Server Peer-to-Peer Services provided by multiple servers Proxy servers and caches Mobile code and mobile agents Network computers Thin clients and mobile devices

24

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

Page 25: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Clients Invoke Individual Servers

Server

Client

Client

invocation

result

Serverinvocation

result

Process:Key:

Computer:

25

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 58-66

Page 26: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Peer-to-peer Systems

Application

Application

Application

Peer 1

Peer 2

Peer 3

Peers 5 .... N

Sharableobjects

Application

Peer 4

26

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp58-66

Page 27: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

A Service by Multiple Servers

Server

Server

Server

Service

Client

Client

27

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 58-66

Page 28: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Web Proxy Server

Client

Proxy

Web

server

Web

server

serverClient

28Adapted from: Instructor’s Guide for

CDKB, Distributed Systems: Concepts and Design Edn. 5

© Pearson Education 2012

CDKB, pp58-66

Page 29: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Web Appletsa) client request results in the downloading of applet code

Web server

ClientWeb serverApplet

Applet code

Client

b) client interacts with the applet

29

<!DOCTYPE html> <html> <head>

<title>HelloWorld_example.html</title> </head> <body> <h1>A Java applet example</h1> <p>Here it is: <applet code="HelloWorld.class" height="40" width="200"> This is where HelloWorld.class runs. </applet></p> </body> </html> Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5

© Pearson Education 2012

CDBK 58-66

Page 30: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Thin Clients and Compute Servers

ThinClient

ApplicationProcess

Network computer or PCCompute server

network

30

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp 58 -66

Page 31: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

31

Page 32: 1DT066 D ISTRIBUERADE I NFORMATIONSSYSTEM Distribuerade System Karaktäristik och Design 1.

Summary

Definitions of distributed systems and comparisons to centralized systems.

The characteristics of distributed systems. The seven forms of transparency. The basic design issues.

32

Adapted from: Instructor’s Guide for CDKB, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 CDKB, pp

CDKB, pp