01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter...

14
Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof. Dr. Otto Spaniol Dipl.-Inform. Dirk Thißen Organisation about all 14 days Room AH V, RWTH Aachen Teacher-centred exercises Exercises Dirk Thißen Lehrstuhl für Informatik IV, Room 4226 (Building E1) Phone: 0241 / 80 - 21450 eMail: [email protected] Contact 10. May 2004 24. May 2004 14. June 2004 28. June 2004 12. July 2004 26. July 2004 Available on our homepage: http://www-i4.informatik.rwth-aachen.de/teaching/lectures/sub/vs/vsSS04 Slide copies and Video records to the lecture At the end of the summer term Written exam Literature Available in the library, section DiS A.S. Tanenbaum, M. van Steen: Distributed Systems – Principles and Paradigms. Prentice-Hall, 2002. G. Coulouris, J. Dollimore, T. Kindberg: Distributed Systems - Concepts and Design. Addison-Wesley, 2001. Z. Tari, O. Bukhres: Fundamentals of Distributed Object Systems – The CORBA Perspective. Wiley Interscience, 2001. Further literature S. Baker: CORBA Distributed Objects using Orbix. Addison-Wesley & acm Press, 1997. C. Popien: Verteilte Systeme, Skript zur Vorlesung 1996. Verlag der Augustinus Buchhandlung, Aachener Beiträge zur Informatik, Band 16, 1996. Current (related) events: Lecture ”Dependable Distributed Systems“, Prof. Gärtner Classification of the lecture Following events: Seminar “Data Communications and Distributed Systems” Diploma Theses at Informatik 4 Several lectures, e.g. Multimedia Systems, Security in Communication Networks, … Useful prerequisites: Lecture on Data Communication or Internet Technology

Transcript of 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter...

Page 1: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

1C

hap

ter

1:

In

trodu

cti

onDis

trib

ute

dS

yste

ms

Lehr

stuh

l für

Info

rmat

ik IV

RW

TH

Aac

hen

Pro

f. D

r. O

tto

Sp

anio

l

Dip

l.-In

form

. Dir

k T

hiß

en

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

2C

hap

ter

1:

In

trodu

cti

on

Org

anis

atio

n

•ab

out a

ll 14

day

s•

Roo

m A

H V

, RW

TH

Aac

hen

•T

each

er-c

entr

ed e

xerc

ises

Exe

rcis

es

Dirk

Thi

ßen

Lehr

stuh

l für

Info

rmat

ik IV

, Roo

m 4

226

(Bui

ldin

g E

1)P

hone

: 02

41 /

80 -

2145

0eM

ail:

this

sen@

info

rmat

ik.r

wth

-aac

hen.

de

Co

nta

ct

10.

May

200

4

24.

May

200

4

14.

June

200

4

28.

June

2004

12.

July

200

4

26.

July

2004

Ava

ilabl

e on

our

hom

epag

e:ht

tp://

ww

w-i4

.info

rmat

ik.r

wth

-aac

hen.

de/te

achi

ng/le

ctur

es/s

ub/v

s/vs

SS

04

Slid

e co

pie

s an

d V

ideo

rec

ord

s to

th

e le

ctu

re

At t

he e

nd o

f the

sum

mer

term

Wri

tten

exa

m

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

3C

hap

ter

1:

In

trodu

cti

on

Lit

erat

ure

Ava

ilab

le in

th

e lib

rary

, sec

tio

n D

iS

•A

.S. T

anen

baum

, M. v

an S

teen

: Dis

trib

uted

Sys

tem

s –

Prin

cipl

es a

nd

Par

adig

ms.

Pre

ntic

e-H

all,

2002

.

•G

. Cou

lour

is, J

. Dol

limor

e, T

. Kin

dber

g: D

istr

ibut

ed S

yste

ms

-C

once

pts

and

Des

ign.

Add

ison

-Wes

ley,

200

1.

•Z

. Tar

i, O

. Buk

hres

: Fun

dam

enta

ls o

f Dis

trib

uted

Obj

ect S

yste

ms

–T

he

CO

RB

A P

ersp

ectiv

e. W

iley

Inte

rsci

ence

, 200

1.

Fu

rth

er li

tera

ture

•S

. Bak

er: C

OR

BA

Dis

trib

uted

Obj

ects

usi

ng O

rbix

. Add

ison

-Wes

ley

& a

cmP

ress

, 199

7.

•C

. Pop

ien:

Ver

teilt

eS

yste

me,

Skr

iptz

urV

orle

sung

1996

. Ver

lag

der

Aug

ustin

usB

uchh

andl

ung,

Aac

hene

rB

eitr

äge

zur

Info

rmat

ik, B

and

16, 1

996.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

4C

hap

ter

1:

In

trodu

cti

on

Cu

rren

t (r

elat

ed)

even

ts:

→Le

ctur

e ”D

epen

dabl

eD

istr

ibut

edS

yste

ms“

, Pro

f. G

ärtn

er

Cla

ssif

icat

ion

of

the

lect

ure

Fo

llow

ing

eve

nts

:

→S

emin

ar “

Dat

a C

omm

unic

atio

ns a

nd D

istr

ibut

ed S

yste

ms”

→D

iplo

ma

The

ses

at In

form

atik

4

→S

ever

al le

ctur

es, e

.g. M

ultim

edia

Sys

tem

s, S

ecur

ity in

Com

mun

icat

ion

Net

wor

ks, …

Use

ful p

rere

qu

isit

es:

→Le

ctur

e on

Dat

a C

omm

unic

atio

nor

Inte

rnet

Tec

hnol

ogy

Page 2: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

5C

hap

ter

1:

In

trodu

cti

on

Wh

at is

a D

istr

ibu

ted

Sys

tem

?

Def

initi

on:

A D

istr

ibu

ted

Sys

tem

is a

sys

tem

with

spa

tially

dis

trib

uted

co

mpo

nent

s, w

hich

do

not u

se s

hare

d m

emor

y an

d w

hich

are

m

anag

ed in

a d

ecen

tral

ised

man

ner.

For

rea

lisin

g co

mm

on g

oals

, aco

oper

atio

n of

thes

e co

mpo

nent

sis

pos

sibl

e. [P

opie

n]

The

re a

re s

ever

al (

diffe

rent

) de

finiti

ons

for

Dis

trib

uted

Sys

tem

s.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

6C

hap

ter

1:

In

trodu

cti

on

... M

ore

Def

init

ion

s...

Or

som

etim

es:

“A d

istr

ibut

edsy

stem

ison

ein

whi

chth

efa

ilure

of a

com

pute

rw

hich

you

didn

‘tev

enkn

owex

iste

dca

nre

nder

your

own

com

pute

run

usab

le.“

(Les

lie L

ampo

rt)

orA

Dis

trib

ute

d S

yste

mis

a c

olle

ctio

n of

inde

pend

ent c

ompu

ters

that

ap

pear

s to

its

user

s as

a s

ingl

e co

here

nt s

yste

m. [

Tan

enba

um]

orA

Dis

trib

ute

d S

yste

mis

a s

yste

m in

whi

ch h

ardw

are

or s

oftw

are

com

pone

nts

loca

ted

at n

etw

orke

d co

mpu

ters

com

mun

icat

e an

d co

ordi

nate

th

eir

actio

nson

ly b

y pa

ssin

g m

essa

ges.

[Cou

lour

is]

orA

Dis

trib

ute

d S

yste

mis

a c

olle

ctio

n of

aut

onom

ous

com

pute

rslin

ked

by a

ne

twor

k an

d eq

uipp

ed w

ith d

istr

ibut

ed s

yste

m s

oftw

are.

[...]

The

dist

ribut

ed

syst

em s

oftw

are

enab

les

the

com

pris

ing

com

pute

rs to

coo

rdin

ate

thei

r ac

tiviti

esan

d to

sha

re s

yste

m r

esou

rces

. [T

ari]

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

7C

hap

ter

1:

In

trodu

cti

on

Co

nte

nts

1. In

tro

du

ctio

n:

Cla

ssif

icat

ion

an

d c

har

acte

rist

ics

of

Dis

trib

ute

d

Sys

tem

s

Typ

es o

f M

idd

lew

are

for

Dis

trib

ute

d S

yste

ms

Co

mm

un

icat

ion

in D

istr

ibu

ted

Sys

tem

s:

Clie

nt/

Ser

ver-

Mo

del

, Rem

ote

Pro

ced

ure

Cal

l, R

emo

te

Met

ho

d In

voca

tio

n, M

essa

ge-

Ori

ente

d S

yste

ms

2. P

roce

sses

an

d T

hre

ads,

(M

ob

ile)

Ag

ents

3. B

asic

pri

nci

ple

s:

Nam

ing

, Co

ncu

rren

cy, S

ynch

ron

isat

ion

, T

ran

sact

ion

s, R

eplic

atio

n, C

on

sist

ency

4. M

idd

lew

are:

DC

OM

, Jav

a R

MI,

CO

RB

A

5. T

he

Co

mm

on

Ob

ject

Req

ues

t B

roke

r A

rch

itec

ture

6. S

ervi

ces

and

Co

mp

on

ents

: th

e W

eb S

ervi

ces

con

cep

t

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

8C

hap

ter

1:

In

trodu

cti

on

Cla

ssif

icat

ion

of

Dis

trib

ute

d S

yste

ms

loos

e co

uplin

g

netw

ork

with

inde

pend

ent

PC

s/w

orks

tatio

ns a

nd s

hare

d se

rver

s

tight

ly c

oupl

ing

dist

ribut

ed a

pplic

atio

n on

se

vera

l hom

ogen

eous

co

mpu

ters

tight

ly c

oupl

ing

mul

ti-pr

oces

sor

syst

ems

loos

e co

uplin

g

colle

ctio

n of

co

mpu

ters

in a

ne

twor

k

Cla

ssifi

catio

n by

•H

ardw

are:

com

putin

g po

wer

(tig

htly

res

p. lo

ose

coup

ling)

•S

oftw

are:

ope

ratin

g sy

stem

s an

d ap

plic

atio

ns (

tight

ly r

esp.

loos

e co

uplin

g)

Har

dwar

eSof

twar

e

--no

t sui

tabl

e --

mul

ti-pr

oces

sor

oper

atin

g sy

stem

s

net

wo

rk o

per

atin

g s

yste

ms

(mos

t use

d co

ncep

t: ne

twor

k w

ith in

depe

nden

t com

pute

rs

but s

hare

d re

sour

ces)

dist

ribut

ed o

pera

ting

syst

ems

(for

a u

ser,

the

netw

ork

look

s lik

e a

sing

le c

ompu

ter)

Page 3: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

9C

hap

ter

1:

In

trodu

cti

on

Dis

trib

ute

d O

per

atin

g S

yste

ms

Exa

mpl

e: C

lust

er o

f wor

ksta

tions

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

10

Ch

ap

ter

1:

In

trodu

cti

on

Net

wo

rk O

per

atin

g S

yste

m

Exa

mpl

e: th

eIn

tern

et

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

11

Ch

ap

ter

1:

In

trodu

cti

on

Evo

luti

on

of

Dis

trib

ute

d S

yste

ms

Sin

ce th

e 19

80s

a ge

nera

l tre

nd to

rej

ectio

n fr

om c

entr

alis

ed s

yste

ms

can

be

seen

.

The

dev

elop

men

t of d

istr

ibut

ed s

yste

ms

was

sup

port

ed b

y

•H

ardw

are:

exp

losi

on in

the

perf

orm

ance

of s

emic

ondu

ctor

chi

ps

�in

crea

sing

per

form

ance

whi

lepr

ices

and

dim

ensi

ons

wer

ede

crea

sed

�us

age

of m

ore

com

plex

sof

twar

e on

mor

e an

d m

ore

com

pute

rs

•C

omm

unic

atio

n: d

evel

opm

ent o

f fas

t loc

al n

etw

orks

�re

duct

ion

of a

cces

s tim

es

�fo

reru

nner

Eth

erne

t

•S

oftw

are

engi

neer

ing:

mod

ules

, int

erfa

ces,

obj

ects

�R

emot

e P

roce

dure

Cal

l, ob

ject

-orie

nted

mod

ellin

g

•A

uton

omy

of o

rgan

isat

ions

: Dec

entr

alis

atio

n

�no

mor

e st

rict h

iera

rchi

cally

org

anis

atio

n fo

rms

in e

nter

pris

es

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

12

Ch

ap

ter

1:

In

trodu

cti

on

Wh

y D

istr

ibu

ted

Sys

tem

s?

Ad

van

tag

es

•A

dapt

atio

n of

cap

aciti

es

�A

dapt

atio

n of

sys

tem

siz

e to

cur

rent

req

uire

men

ts

•In

tegr

atio

n of

exi

stin

g so

lutio

ns

�U

sage

of l

egac

y sy

stem

s by

new

sys

tem

com

pone

nts

(it is

not

nec

essa

ry to

dev

elop

a n

ew s

yste

m w

ith th

e sa

me

func

tiona

litie

s)

•R

isk

min

imis

atio

n

�B

y ex

pand

ing

the

syst

em,t

he r

isk

of o

verlo

adin

g so

me

syst

em c

ompo

nent

s is

min

imis

ed

•F

lexi

bilit

y, a

dapt

abili

ty

�Lo

wer

cos

ts b

y m

anag

eabl

e st

ruct

ures

•A

uton

omy

�T

oler

ance

of s

ingl

e fa

ilure

s by

oth

er c

ompo

nent

s

Page 4: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

13

Ch

ap

ter

1:

In

trodu

cti

on

... b

ut.

..D

isad

van

tag

es a

nd

pro

ble

ms

•T

echn

olog

y�

mor

e co

mpl

exity

by

dist

ribut

ion

and

syst

em h

eter

ogen

eity

•C

ompl

ex in

fras

truc

ture

s

�m

anag

emen

t of t

he w

hole

sys

tem

•La

ck o

f sof

twar

e

�no

exp

erie

nce

inde

velo

ping

dis

trib

uted

sof

twar

e

•S

ecur

ity r

isks

�ne

w s

ourc

es o

f fai

lure

s by

new

com

pone

nts

�da

ta p

rote

ctio

n: e

asie

r ac

cess

as

in s

epar

ated

dat

a st

orag

e

•P

aral

lel e

vent

s

�or

derin

g of

eve

nts

occu

rrin

g on

diff

eren

t com

pute

rs

•P

robl

ems

with

con

sist

ency

�ac

cess

to d

istr

ibut

ed d

ata

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

14

Ch

ap

ter

1:

In

trodu

cti

on

Req

uir

emen

ts t

o D

istr

ibu

ted

Sys

tem

s

•O

penn

ess:

inte

rope

rabi

lity

and

port

abili

ty o

f a a

sys

tem

•In

tegr

atio

n: h

andl

ing

the

hete

roge

neity

•F

lexi

bilit

y: a

dapt

to th

e ev

olut

ion

•M

odul

arity

: for

ach

ievi

ng fl

exib

ility

•F

eder

atio

n: c

onne

ctio

n of

aut

onom

ous

syst

ems

•M

anag

eabi

lity:

han

dlin

g th

e co

mpl

exity

•S

ervi

ce q

ualit

y: g

uara

ntee

of u

ser

requ

irem

ents

to s

peci

al s

ervi

ces

•S

ecur

ity: p

rote

ctio

n ag

ains

t una

utho

rised

acc

esse

s

•T

ran

spar

ency

: hid

e im

plem

enta

tion

deta

ils a

nd c

ompl

exity

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

15

Ch

ap

ter

1:

In

trodu

cti

on

Tra

nsp

aren

cies

Tra

nspa

renc

y: h

ide

impl

emen

tatio

n de

tails

Impo

rtan

t in

dist

ribut

ed s

yste

ms:

di

strib

utio

n tr

ansp

aren

cy(h

ide

the

com

plex

ity o

f a d

istr

ibut

ed s

yste

m)

•ea

ses

the

usag

e of

dis

trib

uted

sys

tem

sso

ftwar

e

•hi

des

inte

rnal

eve

nts

from

a u

ser

•su

ppor

ts a

n ap

plic

atio

n pr

ogra

mm

er

som

e tr

ansp

aren

cies

:

•A

cces

s tr

ansp

aren

cy•

Loca

tion

tran

spar

ency

•R

eplic

atio

n tr

ansp

aren

cy•

Con

curr

ency

tran

spar

ency

•M

igra

tion

tran

spar

ency

•F

ailu

re tr

ansp

aren

cy•

Res

ourc

e tr

ansp

aren

cy

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

16

Ch

ap

ter

1:

In

trodu

cti

on

Tra

nsp

aren

cies

Hid

e w

heth

er a

(so

ftwar

e) r

esou

rce

is in

mem

ory

or o

n di

skP

ersi

sten

ce

Hid

e th

e fa

ilure

and

rec

over

y of

a r

esou

rce

Fai

lure

Hid

e th

at a

res

ourc

e m

ay b

e sh

ared

by

seve

ral

com

petit

ive

user

sC

oncu

rren

cy

Hid

e th

at a

res

ourc

e m

ay b

e ru

n in

sev

eral

inst

ance

s R

eplic

atio

n

Hid

e th

at a

res

ourc

e m

ay b

e m

oved

to a

noth

er lo

catio

n w

hile

in u

seR

eloc

atio

n

Hid

e th

at a

res

ourc

e m

ay m

ove

to a

noth

er lo

catio

nM

igra

tion

Hid

e w

here

a r

esou

rce

is lo

cate

dLo

catio

n

Hid

e di

ffere

nces

in d

ata

repr

esen

tatio

n an

d ho

w a

re

sour

ce is

acc

esse

dA

cces

s

Des

crip

tio

nT

ran

spar

ency

Page 5: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

17

Ch

ap

ter

1:

In

trodu

cti

on

Han

dlin

g D

istr

ibu

tio

n:

Mid

dle

war

eF

or h

andl

ing

the

larg

e se

t of t

rans

pare

ncie

s, a

spe

cial

dis

trib

utio

n in

fras

truc

ture

is

need

ed.

Thi

s in

fras

truc

ture

is c

alle

d D

istr

ibu

tio

n P

latf

orm

(or:

Mid

dle

war

e). T

he

func

tiona

litie

s ca

n be

com

pare

d w

ith th

e hi

gher

laye

rs o

f the

OS

I ref

eren

ce m

odel

fo

r co

mm

unic

atio

n pr

otoc

ols:

The

mid

dlew

are

is b

uild

upo

n di

ffere

nt

oper

atin

g sy

stem

s, n

etw

orks

, and

co

mm

unic

atio

n pr

otoc

ols

(laye

r 1-

4).

The

app

licat

ions

can

be

prog

ram

med

in

diffe

rent

lang

uage

s.

... a

nd th

e m

iddl

ewar

e re

alis

es th

e co

oper

atio

n be

twee

n th

e so

ftwar

e co

mpo

nent

s.

•M

anag

emen

t of d

ialo

gs (

laye

r 5)

, •

Inde

pend

ent t

rans

fer

synt

ax (

laye

r 6)

,

•S

ecur

ity, t

rans

actio

ns, s

ynch

roni

satio

n, ..

.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

18

Ch

ap

ter

1:

In

trodu

cti

on

So

ftw

are

Co

nce

pts

Pro

vide

di

strib

utio

n tr

ansp

aren

cy

Add

ition

al la

yer

atop

of N

etw

ork

Ope

ratin

g S

yste

ms

impl

emen

ting

gene

ral-p

urpo

se s

ervi

ces

Mid

dlew

are

Offe

r lo

cal

serv

ices

to

rem

ote

clie

nts

Loos

ely-

coup

led

oper

atin

g sy

stem

for

hete

roge

neou

s m

ultic

ompu

ters

(LA

N a

nd

WA

N)

Net

wor

k O

pera

ting

Sys

tem

Hid

e an

d m

anag

e ha

rdw

are

reso

urce

s

Tig

htly

-cou

pled

ope

ratin

g sy

stem

for

mul

ti-pr

oces

sors

and

hom

ogen

eous

m

ultic

ompu

ters

Dis

trib

uted

O

pera

ting

Sys

tem

Mai

n G

oal

Des

crip

tio

nS

yste

m

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

19

Ch

ap

ter

1:

In

trodu

cti

on

Rel

atio

n t

o O

SI r

efer

ence

mo

del

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

20

Ch

ap

ter

1:

In

trodu

cti

on

OS

I lay

ers

Laye

rD

escr

iptio

nE

xam

ples

App

licat

ion

Pro

toco

ls th

at a

re d

esig

ned

to m

eet t

he c

omm

unic

atio

n re

quire

men

ts o

fsp

ecifi

c ap

plic

atio

ns, o

ften

defin

ing

the

inte

rfac

e to

a s

ervi

ce.

HT

TP

, FT

P, S

MT

P,

CO

RB

A II

OP

Pre

sent

atio

nP

roto

cols

at t

his

leve

l tra

nsm

it da

ta in

a n

etw

ork

repr

esen

tatio

n th

at is

inde

pend

ent o

f the

rep

rese

ntat

ions

use

d in

indi

vidu

al c

ompu

ters

,whi

chm

ay d

iffer

. Enc

rypt

ion

is a

lso

perf

orm

ed in

this

laye

r, if

req

uire

d.

Sec

ure

Soc

kets

(SS

L),C

OR

BA

Dat

aR

ep.

Ses

sion

At t

his

leve

l rel

iabi

lity

and

adap

tatio

n ar

e pe

rfor

med

, suc

h as

det

ectio

n of

failu

res

and

auto

mat

ic r

ecov

ery.

Tra

nspo

rtT

his

is th

e lo

wes

t lev

el a

t whi

ch m

essa

ges

(rat

her

than

pac

kets

)ar

e ha

ndle

d.M

essa

ges

are

addr

esse

d to

com

mun

icat

ion

port

s at

tach

ed to

pro

cess

es,

Pro

toco

ls in

this

laye

r m

ay b

e co

nnec

tion-

orie

nted

or

conn

ectio

nles

s.

TC

P, U

DP

Net

wor

kT

rans

fers

dat

a pa

cket

s be

twee

n co

mpu

ters

in a

spe

cific

net

wor

k. In

a W

AN

or a

n in

tern

etw

ork

this

invo

lves

the

gene

ratio

n of

a r

oute

pas

sing

thro

ugh

rout

ers.

In a

sin

gle

LAN

no

rout

ing

is r

equi

red.

IP, A

TM

virt

ual

circ

uits

Dat

a lin

kR

espo

nsib

le fo

r tr

ansm

issi

on o

f pac

kets

bet

wee

n no

des

that

are

dire

ctly

conn

ecte

d by

a p

hysi

cal l

ink.

In a

WA

N tr

ansm

issi

on is

bet

wee

n pa

irs o

fro

uter

s or

bet

wee

n ro

uter

s an

d ho

sts.

In a

LA

N it

is b

etw

een

any

pair

of h

osts

.Eth

erne

t MA

C,

AT

M c

ell t

rans

fer,

PP

PP

hysi

cal

The

circ

uits

and

har

dwar

e th

at d

rive

the

netw

ork.

It tr

ansm

its s

eque

nces

of

bina

ry d

ata

by a

nalo

gue

sign

allin

g, u

sing

am

plitu

de o

r fr

eque

ncy

mod

ulat

ion

of e

lect

rical

sig

nals

(on

cab

le c

ircui

ts),

ligh

t sig

nals

(on

fibr

e op

tic c

ircui

ts)

or o

ther

ele

ctro

mag

netic

sig

nals

(on

rad

io a

nd m

icro

wav

e ci

rcui

ts).

Eth

erne

t bas

e-ba

ndsi

gnal

ling,

IS

DN

Page 6: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

21

Ch

ap

ter

1:

In

trodu

cti

on

Mid

dle

war

e an

d O

pen

nes

s

In a

n op

en m

iddl

ewar

e-ba

sed

dist

ribut

ed s

yste

m, t

he p

roto

cols

use

d by

ea

ch m

iddl

ewar

e la

yer

shou

ld b

e th

e sa

me,

as

wel

l as

the

inte

rfac

es th

ey

offe

r to

app

licat

ions

.

1.23

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

22

Ch

ap

ter

1:

In

trodu

cti

on

Co

mp

aris

on

bet

wee

n S

yste

ms

Ope

nO

pen

Clo

sed

Clo

sed

Ope

nnes

s

Var

ies

Yes

Mod

erat

ely

No

Sca

labi

lity

Per

nod

eP

er n

ode

Glo

bal,

dist

ribut

edG

loba

l, ce

ntra

lR

esou

rce

man

agem

ent

Mod

el

spec

ific

File

sM

essa

ges

Sha

red

mem

ory

Bas

is fo

r co

mm

unic

atio

n

NN

N1

Num

ber

of c

opie

s of

O

S

No

No

Yes

Yes

Sam

e O

S o

n al

l nod

es

Hig

hLo

wH

igh

Ver

y H

igh

Deg

ree

of

tran

spar

ency

Mu

ltic

om

.M

ult

ipro

c.

Mid

dle

war

e-b

ased

OS

Net

wo

rk

OS

Dis

trib

ute

d O

SIt

em

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

23

Ch

ap

ter

1:

In

trodu

cti

on

Mid

dle

war

e -

Ap

pro

ach

esD

istr

ibu

ted

file

sys

tem

s•

Dis

trib

utio

n tr

ansp

aren

cies

for

files

•P

opul

ar b

ecau

se o

f its

sca

labi

lity

Dis

trib

ute

d d

ocu

men

ts•

Exa

mpl

e W

orld

Wid

e W

eb•

Info

rmat

ion

are

seen

as

docu

men

ts, a

ddre

ssed

by

an U

RL

Rem

ote

Pro

ced

ure

Cal

l (R

PC

)•

Ear

ly m

iddl

ewar

e ap

proa

ch fo

r tr

ansp

aren

cy in

com

mun

icat

ion

Dis

trib

ute

d o

bje

cts

•E

nhan

cem

ents

of R

PC

to a

cces

s to

rem

ote

obje

cts

•O

nly

the

inte

rfac

e ca

n be

see

n fr

om o

utsi

de, t

he im

plem

enta

tion

deta

ils a

re

tran

spar

ent

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

24

Ch

ap

ter

1:

In

trodu

cti

on

File

Sys

tem

Bas

ed M

idd

lew

are

•B

ases

on

file

exch

ange

•T

rans

fer

Mod

els

(a)

uplo

ad/d

ownl

oad

mod

el(b

) re

mot

e ac

cess

mod

el

(a)

(b)

Page 7: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

25

Ch

ap

ter

1:

In

trodu

cti

on

Do

cum

ent-

Bas

ed M

idd

lew

are

•E

xam

ple

Wor

ld W

ide

Web

(W

WW

)

�a

big

dire

cted

gra

ph o

f doc

umen

ts�

Tra

nspa

renc

y fo

r do

cum

ents

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

26

Ch

ap

ter

1:

In

trodu

cti

on

Co

mm

un

icat

ion

in D

istr

ibu

ted

S

yste

ms

Pro

blem

in d

istr

ibut

ed s

yste

ms:

Hig

h ov

erhe

ad c

ause

d by

pro

toco

l sta

ck

•N

eed

for

an e

asy

mod

el fo

r ef

ficie

nt c

omm

unic

atio

n

Idea

: •S

truc

turin

g of

the

oper

atin

g sy

stem

as

a se

t of c

oope

ratin

g pr

oces

ses

(Ser

vers

)•

Ser

vers

offe

r se

rvic

es fo

r us

ers

(Clie

nts

)

•C

omm

unic

atio

n by

usi

ng e

asy

prim

itive

s

Clie

nt/

Ser

ver

Mo

del

Rem

ote

Pro

ced

ure

Cal

l

Com

mun

icat

ion

betw

een

proc

esse

s is

a c

entr

al p

art o

f eac

h di

strib

uted

sys

tem

.W

ithou

t com

mun

icat

ion,

onl

y a

colle

ctio

n of

aut

onom

ous

proc

esse

sw

ithou

t a

poss

ibili

ty o

f coo

pera

tion

wou

ld e

xist

.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

27

Ch

ap

ter

1:

In

trodu

cti

on

Clie

nt/

Ser

ver

Mo

del

Clie

ntS

erve

r

netw

ork

Ker

nel

Ker

nel

requ

est

repl

y

•C

omm

unic

atio

n m

odel

with

low

man

agem

ent o

verh

ead

•C

onne

ctio

n-le

ss r

eque

st/r

eply

pro

toco

l (si

mpl

est c

ase:

onl

y ne

ed fo

r la

yer

1, 2

,

and

5)

•D

irect

add

ress

ing

of th

e se

rver

by

a cl

ient

:

�no

rmal

ly, t

he c

lient

kno

ws

the

serv

er's

add

ress

�si

mpl

e ad

dres

sing

: machine.process

�co

uld

by w

ritte

n(f

orpr

oces

s 42

26 o

n ho

st 1

37.2

26.1

2.22

1):

137.226.12.221.4226

or

[email protected]

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

28

Ch

ap

ter

1:

In

trodu

cti

on

Co

mm

un

icat

ion

Seq

uen

ce

Com

mun

icat

ion

ism

ade

byus

ing

two

syst

em c

alls

:

send(a, &mp)

tran

smits

a m

essa

ge r

efer

ence

d by

mp

to p

roce

ss a

.

The

cal

ler

is b

lock

ed w

hile

sen

ding

the

mes

sage

.

receive(a, &mp)

stor

es a

mes

sage

s re

ceiv

ed a

t add

ress

ain

a b

uffe

r re

fere

nced

by

mp

. The

cal

ler

is b

lock

ed w

hile

rec

eivi

ng th

e m

essa

ge.

Nee

ded:

syn

chro

nisa

tion

of send

and receive

.

wor

king

bloc

ked

send

receive

bloc

ked

wor

king

send

receive

Beg

inof

tr

ansm

issi

on

Clie

ntS

erve

r

Beg

inof

tr

ansm

issi

on

End

of

tran

smis

sion

End

of

tran

smis

sion

Page 8: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

29

Ch

ap

ter

1:

In

trodu

cti

on

Exa

mp

le -

Ser

ver

head

er.h

con

tain

s co

mm

on

type

def

initi

ons

for

clie

nt a

nd

serv

er

Ser

ver:

cre

ates

a m

essa

ge m

2 ba

sed

on th

e co

nten

ts o

f mes

sage

m1

bloc

king

, wai

t

→fo

r in

com

ing

mes

sage

s fo

r F

ILE

_SE

RV

ER

Sen

d re

sult

to th

e ca

lling

clie

nt

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

30

Ch

ap

ter

1:

In

trodu

cti

on

Exa

mp

le -

Clie

nt

Sen

ding

of

the

requ

est

and

bloc

king

whi

le

wai

ting

for

the

repl

y

Clie

nt: u

ses

FIL

E_S

ER

VE

R,

to c

opy

a fil

e

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

31

Ch

ap

ter

1:

In

trodu

cti

on

Nam

e S

erve

r

Clie

ntS

erve

r

netw

ork

Ker

nel

Ker

nel

Nam

e S

erve

r

Ker

nel

netw

ork

3. r

eque

st

4. r

eply

1. r

eque

st

2. r

eply

Enh

ance

men

t of C

lient

/Ser

ver

Mod

el (

com

mon

met

hod)

:U

sing

a N

ame

serv

er

1. R

eque

st fo

r de

stin

atio

n ad

dres

s of

sea

rche

d se

rver

2. R

eply

with

ser

ver

addr

ess

3. R

eque

st to

ser

ver

4. R

eply

by

serv

er

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

32

Ch

ap

ter

1:

In

trodu

cti

on

Blo

ckin

g in

Clie

nt/

Ser

ver

Sys

tem

s

A d

istin

ctio

n is

mad

e be

twee

n b

lock

ing

and

no

n-b

lock

ing

prim

itive

s.T

he a

pplic

atio

n pr

ogra

mm

er c

an c

hoos

e fr

om th

em.

Blo

ckin

g pr

imiti

ves

•B

lock

s a

proc

ess

whi

le s

endi

ng a

mes

sage

•F

urth

er o

pera

tions

are

wor

ked

on o

nly

afte

r se

ndin

g th

e co

mpl

ete

mes

sage

•In

the

sam

e w

ay: r

ecei

ving

a m

essa

ge

Non

-blo

ckin

g pr

imiti

ves

•T

he m

essa

ge is

cop

ied

in a

buf

fer

man

aged

by

the

oper

atin

g sy

stem

•A

fter

the

copy

ope

ratio

n th

e se

nder

is u

nblo

cked

•S

peed

-up

by s

endi

ng th

e m

essa

ge a

nd w

orki

ng o

n th

e fu

rthe

r op

erat

ions

in

para

llel

•D

isad

vant

age:

the

send

er d

oes

not k

now

whe

n th

e tr

ansm

issi

on is

fini

shed

and

th

e bu

ffer

can

be u

sed

agai

n.

Page 9: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

33

Ch

ap

ter

1:

In

trodu

cti

on

Bu

ffer

ing

Ano

ther

dis

tinct

ion

of p

rimiti

ves

can

be m

ade

by b

uff

ers

Prim

itive

s w

ithou

t buf

fers

•W

ith receive(a, &mp)

the

kern

el is

info

rmed

that

the

calli

ng p

roce

ss w

ants

to

liste

n on

add

ress

afo

ra

mes

sage

to b

est

ored

at &mp

.•

Pro

blem

s:

1. M

essa

ge lo

st fo

r la

te receive

(the

ker

nel d

oes

not k

now

whe

re to

sto

re th

e m

essa

ge)

2. U

sage

of s

ame

addr

ess

by s

ever

al p

roce

sses

Prim

itive

s w

ith b

uffe

rs•

The

ker

nel s

tore

s th

e re

ceiv

ed m

essa

ge fo

r a

cert

ain

time

•P

robl

em: t

he k

erne

l has

to p

rovi

de a

nd m

anag

e ow

n bu

ffers

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

34

Ch

ap

ter

1:

In

trodu

cti

on

Clie

nt/

Ser

ver

Arc

hit

ectu

res

The

sep

arat

ion

of c

lient

and

ser

ver

can

take

pla

ce a

t diff

eren

t poi

nts

in th

e w

hole

app

licat

ion,

con

side

ring

stru

ctur

e an

d ta

sks

of th

e w

hole

sys

tem

.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

35

Ch

ap

ter

1:

In

trodu

cti

on

Mu

lti-

leve

l Sys

tem

s

The

ser

ver

itsel

f can

del

egat

e pa

rts

of it

s ta

sks

to o

ther

ser

vers

. In

doin

g so

, the

se

rver

bec

omes

a c

lient

for

the

new

ser

ver.

Thi

s se

para

tion

by a

reas

of r

espo

nsib

ilitie

s is

cal

led

vert

ical

dis

trib

uti

on

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

36

Ch

ap

ter

1:

In

trodu

cti

on

Oth

er a

rch

itec

ture

sH

oriz

onta

l dis

trib

utio

nar

ises

, whe

n se

rver

(or

clie

nt)

are

split

ted

into

sev

eral

eq

uiva

lent

par

ts (

e.g.

a w

eb s

erve

r fa

rm).

... a

nd th

ere

are

othe

r or

gani

satio

n m

odel

s fo

r cl

ient

/ser

ver

syst

ems

Page 10: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

37

Ch

ap

ter

1:

In

trodu

cti

on

Rem

ote

Pro

ced

ure

Cal

lB

ase

para

digm

for

com

mun

icat

ion

(esp

ecia

lly fo

r lo

cal i

nvoc

atio

ns):

In

pu

t an

d o

utp

ut

of d

ata

By

calli

ng c

omm

unic

atio

n pr

imiti

ves send

and receive

expl

icitl

y:E

xch

ang

eof

dat

a

Nee

d fo

r an

othe

r m

echa

nism

: Le

t dis

trib

uted

com

puta

tions

look

like

cen

tral

ised

one

s

Sol

utio

n (B

irell

and

Nel

son,

198

4):

A p

rogr

am c

alls

a s

ubro

utin

e lo

cate

d on

an

othe

r co

mpu

ter.

Kno

wn

as R

emo

te P

roce

du

re C

all,

RP

C

Prin

cipl

e:

Whe

n a

prog

ram

loca

ted

on h

ost A

calls

a s

ubro

utin

e lo

cate

d on

hos

t B, t

he c

allin

g pr

oces

s on

hos

t Ais

sus

pend

ed w

hile

the

subr

outin

e on

hos

t Bis

exe

cute

d. T

he

exch

ange

of p

aram

eter

s an

d m

essa

ges

is in

visi

ble

for

the

user

.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

38

Ch

ap

ter

1:

In

trodu

cti

on

Rem

ote

Pro

ced

ure

Cal

l

Net

zwer

k

Clie

ntre

ques

t

resu

lt

Mec

hani

sm is

tr

ansp

aren

t for

the

calli

ng c

lient

Clie

ntre

ques

t

resu

lt

Put

dat

aon

sta

ck

Get

dat

afr

om s

tack

subr

outin

eco

mpu

tatio

n

a) L

ocal

cal

l to

subr

outin

e

b) R

emot

e P

roce

dure

Cal

l

Stu

b:

Act

s as

a p

roxy

for

the

subr

outin

e an

d pa

sses

the

requ

est t

o th

e fit

ting

serv

er

Mar

shal

ling:

tr

ansl

ates

dat

a in

to a

n in

depe

nden

t tr

ansp

ort f

orm

at

Ker

nel

Mec

hani

sm is

tran

spar

ent f

or th

e ca

lling

clie

nt

Unm

arsh

allin

g

Mar

shal

ling

Mar

shal

ling

Unm

arsh

allin

g

Ser

ver

stub

Clie

nt s

tub

resu

ltS

erve

r

requ

est

netw

ork

Ker

nel o

n se

rver

hos

tK

erne

l on

clie

nt h

ost

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

39

Ch

ap

ter

1:

In

trodu

cti

on

RP

C -

Pro

cess

Adv

anta

ge:

-th

e di

strib

uted

exe

cutio

n w

orks

with

out e

xplic

itly

calli

ng th

e co

mm

unic

atio

n pr

imiti

ves

by c

lient

res

p. s

erve

r.

-D

etai

ls a

re h

idde

n by

stu

bs.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

40

Ch

ap

ter

1:

In

trodu

cti

on

Rem

ote

Pro

ced

ure

Cal

l -E

xam

ple

Clie

nt:

•C

alls

the

proc

edur

e add(2,4)

•T

he d

ata

are

push

ed o

nto

the

stac

k•

The

clie

nt li

brar

y co

ntai

ns a

ref

eren

ce

to th

e cl

ien

t st

ub

inst

ead

refe

renc

ing

a lo

calp

roce

dure

dire

ctly

Tra

nsm

issi

on o

f con

trol

to th

e st

ub

Clie

nt s

tub:

•G

ener

ates

a m

essa

ge fr

om th

e re

ques

t w

hich

can

be

sent

to th

e se

rver

•M

arsh

allin

g of

the

data

, i.e

. the

dat

a ar

e tr

ansf

orm

ed in

a g

iven

mes

sage

st

ruct

ure

•T

he send

prim

itive

initi

ates

the

tran

smis

sion

of t

he m

essa

ge•

The

stu

b ca

lls receive

and

bloc

ks

Clie

nt:

x = add(2,4)

42add

Stu

b:add 2 4

mp

:

Clie

nt s

tack

send(ServerAdr, &mp)

receive(ClientAdr, &mp)

Page 11: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

41

Ch

ap

ter

1:

In

trodu

cti

on

Rem

ote

Pro

ced

ure

Cal

l -E

xam

ple

Ser

ver

host

:•

The

ser

ver

wai

tsfo

r in

com

ing

requ

ests

by e

xecu

ting receive

.•

The

ker

nel p

asse

s th

e m

essa

ge to

the

serv

er s

tub.

•T

he s

tub

extr

acts

the

data

, pus

hes

them

ont

o th

e se

rver

sta

ck a

nd

calls

the

(loca

l) su

brou

tine.

•W

hen

the

com

puta

tion

is fi

nish

ed,

the

serv

er c

alls

its

stub

. The

stu

b m

arsh

als

the

resu

lt an

d se

nds

a

mes

sage

bac

k to

the

calli

ng c

lient

.

Stu

b:

add 2 4

42addS

erve

r st

ack

6

Ser

ver:

Stu

b:6

mp:

send(ClientAdr, &mp)

receive(ServerAdr, &mp)

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

42

Ch

ap

ter

1:

In

trodu

cti

on

Rem

ote

Pro

ced

ure

Cal

l -E

xam

ple

Clie

nt h

ost:

•T

he c

lient

stu

bw

aits

for

the

repl

y

perf

orm

ing

the receive

•T

he m

essa

ge is

writ

ten

in a

buf

fer

•T

he c

lient

stu

b is

unb

lock

ed•

The

stu

b ex

trac

ts th

e re

sult

and

push

es it

ont

o th

e cl

ient

sta

ck•

The

clie

nt is

giv

en b

ack

cont

rol a

n ge

ts

–lik

e in

the

loca

l cas

e –

the

data

from

its s

tack

6C

lient

:

Stu

b:6

x = 6

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

43

Ch

ap

ter

1:

In

trodu

cti

on

Pro

ble

ms

wit

h R

PC

The

com

mun

icat

ion

betw

een

iden

tical

com

pute

rs c

ause

s no

pro

blem

s.

In h

eter

ogen

eous

sys

tem

s, th

ere

can

be s

ome

prob

lem

s:

•D

iffer

ent c

hara

cter

rep

rese

ntat

ions

(A

SC

II -

ED

CD

IC)

•D

iffer

ent r

epre

sent

atio

n of

inte

gers

(lit

tle e

ndia

n-

big

endi

an)

Ano

ther

pro

blem

are

non

-sca

lar

data

type

s:

•T

here

is n

o sh

ared

add

ress

spa

ce –

how

to tr

ansm

it po

inte

rs a

nd r

efer

ence

s?

•N

orm

ally

: cop

y/re

stor

e, i.

e. tr

ansm

it re

fere

nced

dat

a di

rect

ly

•B

ut th

is w

orks

onl

y fo

r si

mpl

e st

ruct

ures

and

arr

ays;

for

mor

e co

mpl

ex s

truc

ture

s w

hich

are

def

ined

by

the

prog

ram

mer

, the

ser

ver

cann

ot u

nder

stan

d th

e st

ruct

ure.

Con

clus

ion:

clie

nt a

nd s

erve

r ha

ve to

agr

ee o

n a

com

mon

dat

a fo

rmat

whi

ch

can

be tr

ansm

itted

with

the

RP

C.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

44

Ch

ap

ter

1:

In

trodu

cti

on

Gen

erat

ion

of

Stu

bs

For

def

inin

g co

mm

on d

ata

form

ats

and

supp

ortin

gth

e im

plem

enta

tion

of s

tubs

, ve

ry o

ften

only

the

inte

rfac

es a

re d

efin

ed. T

he s

tubs

are

gen

erat

ed fr

om th

ese

defin

ition

aut

omat

ical

ly, c

onta

inig

the

who

le tr

ansf

er s

ynta

x w

hich

can

be

used

.

Page 12: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

45

Ch

ap

ter

1:

In

trodu

cti

on

En

han

cem

ents

of

RP

C

RP

C: d

e-fa

cto-

Sta

ndar

d fo

r co

mm

unic

atio

n in

dis

trib

uted

sys

tem

s

The

RP

C c

an b

e op

timis

ed fo

r sp

ecia

l sce

nario

s. S

ome

varia

nts

are

•Li

ghtw

eigh

t RP

Cfo

r in

ter-

proc

ess

com

mun

icat

ion

in th

e sa

me

addr

ess

spac

e

•A

sync

hron

ous

RP

Cfo

r de

coup

ling

clie

nt a

nd s

erve

r

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

46

Ch

ap

ter

1:

In

trodu

cti

on

Ber

shad

'sL

RP

C

The

dur

atio

n of

a R

PC

dep

ends

on

seve

ral p

aram

eter

s (s

ever

al c

opy

oper

atio

ns

on th

e pa

ram

eter

s, n

etw

ork

dela

y) a

nd c

an ta

ke s

igni

fican

t tim

e. F

or s

ome

circ

umst

ance

s, th

e ex

ecut

ion

can

be s

peed

ed u

p:

→U

se o

f sha

red

mem

ory

for

inte

r-pr

oces

s co

mm

unic

atio

n on

the

sam

e ho

st

•O

nly

one

copy

ope

ratio

n fo

r pa

ram

eter

pas

sing

(in

stea

d of

four

cop

y op

erat

ions

like

in R

PC

)

•T

he c

lient

can

acc

ess

the

serv

er c

ode

usin

g de

fined

acc

ess

poin

ts

•S

peed

-up

up to

thre

e tim

es

→N

ame:

Lig

htw

eigh

t RP

C, L

RP

C(li

ghtw

eigh

t mea

ns e

asie

r an

d fa

ster

)

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

47

Ch

ap

ter

1:

In

trodu

cti

on

Lig

htw

eig

ht

Rem

ote

Pro

ced

ure

Cal

l

2. R

eque

st

4. E

xecu

tion

of p

roce

dure

and

st

orin

g th

e re

sult

Clie

nt

Use

rS

tub

Ser

ver

Ker

nel

Stu

b 3. U

p ca

ll5.

Ret

urn

A

Com

mon

sta

ck

1. C

opyi

ng th

e ar

gum

ents

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

48

Ch

ap

ter

1:

In

trodu

cti

on

•T

he c

lient

can

wor

k on

oth

er ta

sks

till t

he r

esul

t fro

m th

e se

rver

com

es in

•T

he c

lient

get

s ba

ck n

o re

sult

Asy

nch

ron

ou

s R

PC

RP

C: s

ynch

ron

ou

s, i.

e. th

e cl

ient

blo

cks

till t

he s

erve

r re

ques

t com

es in

. But

in

som

e si

tuat

ions

, thi

s w

aitin

g is

not

nec

essa

ry:

In th

ese

case

s: a

syn

chro

no

us

RP

C, i

.e. t

he c

lient

doe

s no

t blo

ck, b

ut is

abl

e to

w

ork

on o

ther

task

s, ti

ll th

e se

rver

inte

rrup

ts it

with

the

resu

lt:

one-

way

RP

C: d

o no

t wai

t for

an

ackn

owle

dgem

ent,

but w

ork

on d

irect

ly

defe

rred

syn

chro

nous

RP

C: r

eque

st a

nd r

eply

bot

h ar

e us

ing

asyn

chro

nous

RP

C

Page 13: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

49

Ch

ap

ter

1:

In

trodu

cti

on

Rem

ote

Met

ho

d In

voca

tio

nB

ase

prin

cipl

e of

RP

C: a

clie

nt c

alls

a s

ubro

utin

e/pr

oced

ure

in a

sep

arat

e se

rver

pr

oces

s.

Rem

ote

Met

ho

d In

voca

tio

n(R

MI)

:bui

lds

upon

the

sam

e pr

inci

ple:

an

obje

ct c

alls

a

met

hod

of a

noth

er o

bjec

t. T

he p

rinci

ple

is th

e sa

me,

but

the

unde

rlyin

g m

odel

is

chan

ged

(and

enh

ance

d w

ith s

ome

mor

e fu

nctio

nalit

y).

Pro

xy: c

lient

sid

e st

ub

for

invo

king

rem

ote

obje

cts

Ske

leto

n: s

erve

r si

de

stub

for

rece

ivin

g pr

oxy

requ

ests

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

50

Ch

ap

ter

1:

In

trodu

cti

on

Pee

r-to

-Pee

rco

mp

uti

ng

•W

eake

ning

of c

lient

and

serv

erro

les

•C

onne

ctio

nbe

twee

nan

ypa

ir of

com

pute

rs

•F

elxi

ble

netw

ork

of c

oope

ratio

ns

•W

ell k

now

nex

ampl

e: F

ile S

harin

g, e

.g. N

apst

er

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

51

Ch

ap

ter

1:

In

trodu

cti

on

Mes

sag

e-b

ased

Co

mm

un

icat

ion

Mes

sag

e-b

ased

(or

even

t-b

ased

) co

mm

unic

atio

n: o

bjec

ts a

re s

endi

ng

info

rmat

ion

to th

e re

ceiv

ers

by u

sing

mes

sage

s. T

hese

mes

sage

s ar

e se

nt

asyn

chro

nous

ly(in

con

tras

t to

the

basi

c pr

inci

ples

of t

he c

omm

unic

atio

n fo

rms

show

n be

fore

). T

he c

omm

unic

atio

n sy

stem

is r

espo

nsib

le fo

r de

liver

ing

the

mes

sage

s

Dis

tinct

ion

betw

een

two

kind

s of

sys

tem

s:

•P

ersi

sten

t com

mun

icat

ion

The

com

mun

icat

ion

syst

em s

tore

s m

essa

ges

till i

t is

able

to d

eliv

er th

em to

the

rece

iver

. Sen

der

and

rece

iver

are

dec

oupl

ed c

ompl

etel

y, th

e re

ceiv

ing

obje

ct is

al

low

ed to

be

not a

vaila

ble

whe

n th

e m

essa

ge is

sen

t.

•T

rans

ient

com

mun

icat

ion

The

com

mun

icat

ion

syst

em o

nly

stor

es th

e m

essa

ge w

hile

sen

der

and

rece

iver

ar

e up

and

run

ning

. If a

mes

sage

can

not b

e de

liver

ed b

ecau

se th

ere

ceiv

er

cann

ot r

each

ed, t

he m

essa

ge is

del

eted

.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

52

Ch

ap

ter

1:

In

trodu

cti

on

Mes

sag

e-q

ueu

ing

Sys

tem

s

Per

sist

ent,

asyn

chro

nous

com

mun

icat

ion:

the

send

er is

gua

rant

eed

that

its

mes

sage

rea

ches

the

rece

iver

. Onl

y w

hen

the

mes

sage

is d

eliv

ered

(and

if th

e re

ceiv

er r

eads

it)

is u

nkno

wn.

Page 14: 01 - Introduction€¦ · Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme 1 Chapter 1: Introduction Distributed Systems Lehrstuhl für Informatik IV RWTH Aachen Prof.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

53

Ch

ap

ter

1:

In

trodu

cti

on

Gen

eral

Arc

hit

ectu

re o

f a

Mes

sag

e-Q

ueu

ing

Sys

tem

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

54

Ch

ap

ter

1:

In

trodu

cti

on

Mes

sag

e B

roke

r

For

inte

grat

ing

seve

ral a

pplic

atio

ns in

a d

istr

ibut

ed in

form

atio

n sy

stem

, som

e m

ore

is n

eces

sary

: the

se a

pplic

atio

ns c

an u

se d

iffer

ent m

essa

ge fo

rmat

s (li

ke in

RP

C).

A

so-c

alle

d m

essa

ge

bro

ker

suits

for

conv

ertin

gm

essa

ges

in o

ther

form

ats.

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

55

Ch

ap

ter

1:

In

trodu

cti

on

Str

eam

-bas

ed C

om

mu

nic

atio

n

The

com

mun

icat

ion

mod

el lo

oked

at a

re n

ot c

onsi

derin

g sp

ecia

l req

uire

men

ts in

in

form

atio

n de

liver

y. B

ut fo

r m

ultim

edia

app

licat

ions

, tim

e re

stric

tions

are

ver

y im

port

ant.

→Le

ctur

e M

ultim

edia

Sys

tem

s

Leh

rstu

hl fü

r I

nfo

rm

ati

k 4

Kom

mu

nik

ati

on

un

d v

erte

ilte

Syste

me

56

Ch

ap

ter

1:

In

trodu

cti

on

Gro

up

Co

mm

un

icat

ion

If a

mes

sage

can

be

sent

to a

gro

up o

f rec

eive

rs, g

roup

com

mun

icat

ion

is n

eede

d fo

r ef

ficie

nt c

omm

unic

atio

n:

•F

ault

tole

ranc

e/av

aila

bilit

yA

serv

ice

is r

eplic

ated

, i.e

. rea

lised

on

seve

ral h

osts

. A c

lient

can

send

its

requ

est t

o al

l mem

bers

of t

he s

erve

r gr

oup.

All

of th

em a

re p

erfo

rmin

g th

e re

ques

t. E

ven

if so

me

of th

e se

rver

s cr

ash,

the

serv

ice

is a

lread

y av

aila

ble.

•P

erfo

rman

ce in

crea

se

Whe

n us

ing

repl

icat

ed s

erve

rs, e

.g. f

or p

laci

ng d

ata

near

to a

clie

nt a

nd th

us

impr

ove

its a

cces

s to

the

data

, all

data

base

s of

the

serv

ers

have

to b

e in

a

cons

iste

nt s

tate

. Whe

n a

data

cha

nge

occu

rs, t

he n

ew d

ata

have

to b

e tr

ansm

itted

to

all

mem

bers

of t

he s

erve

r gr

oup.

•E

vent

not

ifica

tion

One

serv

ice

type

is a

dis

trib

utio

n se

rvic

e: if

a c

erta

in e

vent

occ

urs,

a c

erta

inus

er

grou

p ha

s to

be

info

rmed

. One

exa

mpl

e fo

r su

ch a

ser

vice

is a

new

s sy

stem

, whe

re

a ne

w in

com

ing

new

s is

rep

orte

d to

a u

ser

grou

p.

Nee

ded:

mu

ltic

ast

com

mu

nic

atio

n