صفحه 1:
DIGTRIBOTED GYEREOG
riewiptes ved Poradiges
Geoowd Echos
POOREO 9۰ 0000000
DOGGBRTEDO OOO GTEEO
Cowwurivatiod
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-
صفحه 2:
Presentation protocol
_Session protocol___
Data
Physical
Network
Application
Presentation
Session
Transport
Network
Data link
Physical
Piure €-0. bopers, ioterPaves, ued protocols
ta the OG .ای
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2¢, (c) 2007 Prentice-Hall, Inc. Al rights reserved. 0-13
1227.
صفحه 3:
Layered Protocols (C)
Data link layer header
Network layer header
Transport layer header
Session layer header
Presentation layer header
۳ Application layer header
Message Data link
layer trailer
Bits that actually appear on the network
igure P-C. © tppicd wessage us if oppeors مه the uetwork.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-
صفحه 4:
Oiddteware (Protocols
Application 6
Middleware 5
Transport 4
Network 3
Data link 2
Physical 1
Network
igure 6-9. ۲۰ adapted rePereare wodel
Por vetworked coweusiciod.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2¢, (c) 2007 Prentice-Hall, Inc. Al rights reserved. 0-13
صفحه 5:
Dypes of One uizatios
Synchronize at Synchronize at Synchronize after
request submission request delivery processing by server
Client
Request
Transmission
interrupt
Storage
facility
Server Time —
CPicgure P-P. Oieuicy woiddiewore os on idterwediate (distributed) service ia
uppicotiowtevel pow wunicdtiod.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-
صفحه 6:
ان عمط لممنموروون
Stack pointer
Main program's Main program's
local variables local variables
nbytes
buf
fd
return address
read's local
variables
(a) (b)
igure -S. (a) Paraveter possiey too lool procedure call: the stack bePore
the wall to read. (b) Phe stack while the called procedure is antive.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-
صفحه 7:
Cleat an Gerver Grubs
Wait for result
Client سم _ -----
/ 5
Call remote Return
procedure from call
Request Reply
Server اس nnn
Call local procedure Time ——>
and return results
P-O. Pricciple oP RPO betwers o cles ond server ۳۰ سب
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227.
صفحه 8:
Rewote Procedure Culls (0)
3 جوم وم cdl pours io the Poftowicry
steps!
0. Whe cheat procedure cals the cheat stub to the cord wo.
89 Vke chect stub buds 0 wessage ood calls the loool operation
ورد
9. Vke oled’s OG seads the wessuye to the صووص )2۰
۰ ۰۱۷ rewwote OG ques the wessucp to the server stub.
9. Vke server stub vopacks the poroveters usd cols the server.
Oovuticued ...
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227.
صفحه 9:
3 جوم وم cal pours ia the Potlowwiery
steps (cvcticued):
89 Whe server does the work ocd retures the result ty the stub.
°. Dke server stub pucks tio wessage ocd ols its صما OG.
9. Vke server's OG spuds the wessuye to the clicc’s OG.
9. Vke clea's OG qives the wessuye to the clicct stub.
QO. Wke stub vopacks the result ced neturas to the cect.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227.
صفحه 10:
(Pussicry عون Puraveters (a)
Glient machine Server machine
Client process Server process
1. Client call to
اسك 0 6 Stub makes
of add local call to “ada*
Server stub
eevee 2
1 756
] 0-0 [ 2. Stub builds ints vat) 5: Stub unpacks
int val) ددم iat val) message
2
706 4. Server OS
Client OS ints ۲ Server. OS hands message
ine 0 to server stub
3, Message is sent
across the network
P-?. ke steps tovolved io a doc a
4 سب
۰) را موجه مور
ranenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-
صفحه 11:
(a)
igure P-O. (a) Phe crigicd wessuge oo the Peoiuc.
3, Inc, All rights reserved. 0-13-239227.
idigms, 2e, (c) 2007 Prenti
yum & Van Steen,
ted Systems:
صفحه 12:
(b)
igure P-O. (a) Phe crigicd wessuge oo the Peoiuc.
igms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227.
‘Tanenbaum & Van Steen, Distributed Systems:
صفحه 13:
(c)
igure P-O. (7) he wessage Pier beiogy werted. The litle cucbers ia
boxes todicate the address oP rack byte.
Hall, Inc. All rights reserved. 0-13-239227.
igms, 2e, (c) 2007 Prent
‘Tanenbaum & Van Steen, Distributed Systems:
صفحه 14:
x
foobar's local
variables
ف
5
201
201
z[2]
231
241
(b)
1001 1 02
(Puraweter Gpevitivcaioa
un Grub Geueration
foobar( char x; float y; int z[5] )
(a)
صفحه 15:
0 )انیب
Client Wait for result
سس
39
Call remote Return
procedure from call
Request Reply
Server Call local procedure Time —>
and return results
(a)
igure -d0. (a) Dhe isteraction betwee cheat ood
server too trodiiccal RPO.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227.
صفحه 16:
Ospachrouns RPC (C)
Client Wait for acceptance
7 3
Call remote Return
procedure from call
Request Accept request
Server Call local procedure Time —>
(b)
igure ۶-۰ (ط) Che icteractiog usta asyarkrowus RPC.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227.
صفحه 17:
@spackrowrs RPC (9)
Wait for Interrupt client
5 acceptance
Client = = = == = = 3
Call remote ات 57
(۹ rom ea jesus Acknowledge
Accept
Request request
Server -------- _—_—_—_—— = — ———-— 3 -- —
Call local procedure \ Time ——>
Call client with
one-way RPC
chest ood server ioteractiog thovughs @ ۰۰ مب
tue aspuchrowes (RPOs.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227.
صفحه 18:
لمات هد بت
مه )/(( und a Gerver
TDL compiler
tient code | | ciientstub | {Header | | Serverstub | — | Servercode
اه
‘Compiler C compiler
Cont 29 Sever sub Server
object file object le ‘object fe object fe
Fantime Fantime
Tinker سیم جر Tinker
_ شيب
Giont Sawer
binary binary
وسنت 02-00 . Ske steps to voritiog, a cheot cord
userver in DOE RPO.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-
صفحه 19:
Cleat and a Garver (©) ه بدن(
Tree Pes vutput by the IDL coewpiler:
° @ keuder Pie (ex, interPuve.k, is C terwe).
للك ان
° Whe server stub.
1, Inc. All rights reserved. 0-13-239227-
صفحه 20:
ico a Cleat to a Gerver (()
° Restroicd oP a server wubkes it possible Por ou
tliat to loots the server ocd bier tr it.
© Gerver lovaiva is door in two steps!
C. bow the server's wurhicr.
©. اممو را the server vo thot wackice.
aum & Van Steen, Distributed Systems: Princ ‘Hall, Inc. All rights reserved. 0-13-239227.
صفحه 21:
iodo a Cheat to 0 Gerver (©)
Directory machine
Directory
server
۳
3. Look up server P71 2. Register service
Client machine Server machine
3 server [| 1. Register end point
Client
51
4. Ask for end point عمو ها 1
daemon]. End point
table
(Pigqure -19. Olieatrio-server biericry ics OCC.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, In. All rights reserved. 0
صفحه 22:
@erkeley Govhets
Primitive Meaning
Socket Create a new communication end point
Bind Attach a local address to a socket
Listen Announce willingness to accept connections
Accept Block caller until a connection request arrives
Connect Actively attempt to establish a connection
Send Send some data over the connection
Receive | Receive some data over the connection
Close Release the connection
Prqure P18, Phe socket privitves Por POPE.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-
صفحه 23:
The Oessuge-Pussing | عمو عصان (0)
Server
500161۳] 0100 (۲ 15160 ۳] 01 ۲۵0 ۳-<] ۶ close
Synchronization point اس | Communication
۲ 4 1
5006112070861 «118-1520 1] 052
Client
موجه مومسم 49۰ صسب۳)
موه ری موم
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2¢, (c) 2007 Prentice-Hall, Inc. Al rights reserved. 0-13
صفحه 24:
Primitive Meaning
MPl_bsend | Append outgoing message to a local send buffer
MPI_send Send a message and wait until copied to local or remote butter
MPl_ssend | Senda message and wait until receipt starts
MPI_sendrecv | Send a message and wait for reply
MPI_isend Pass reference to outgoing message, and continue
MPl_issend | Pass reference to outgoing message, and wait until receipt starts
MPI_recv Receive a message; block if there is none
MPI_irecv Check if there is an incoming message, but do not block
P-10. Goowe oP the sost ichutive سب
WEssuye-pussiny priviives oP OP1.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2¢, (c) 2007 Prentice-Hall, Inc. Al rights reserved. 0-13
صفحه 25:
Oessaye-Queuicg Model (0)
Sender Sender ‘Sender
Sender
running running
passive passive
١
Receiver Receiver Receiver Receiver
running passive running passive
fa) 0 0 0
و۲ موه )۵۰ صب۳) joosely-coupled coe micativas
.عصص ری
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, In. All rights reserved. 0
صفحه 26:
Primitive Meaning
Put Append a message to a specified queue
Get Block until the specified queue is nonempty, and remove the first message
Poll Check a specified queue for messages, and remove the first. Never block
Notify Install a handler to be called when a message is put into the specified queue
مهم و igure -10. Basic icterPace to
ارو هو موه
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2¢, (c) 2007 Prentice-Hall, Inc. Al rights reserved. 0-13
صفحه 27:
Geoerd Orchitecture ve a Opssuye-Queuiegy
Look-up
| transport-level Receiver
address of queue
Queuing
Queuing Queue-level
layer address layer
Local OS | Address look-up اوءم ا 05 i |
database
5 __3# Transport-tevel
address
‘Sender
٩-9 ۰ Vke rehtivaship beter queurtevel oddressicgy ort مب
.واو وجس كله اوج اجاج ۱
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-
صفحه 28:
Gevcerd Orchitevture ve a Ovssuye-Queuieg
Sender A
Application Application
Ey
queue
ae us | 82
الح ۵ Messege [iT
Send queue 3
mr Le
igure ۵0 جا“
ae
مرس اي oF a NY
17
1 الجن ج7955 1
von ven ۱ ne Receiver B
بت Router
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-
صفحه 29:
Oessuye (rokers
Repository with
conversion rules
Source client Message broker and programs Destination client
1
Broker
program [<>
Ee Queuing
لالحا layer! |
Network
igure P-Od. Che yecerd اه موه a wessage broker
وناك سم موه و نز
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2¢, (c) 2007 Prentice-Hall, Inc. Al rights reserved. 0-13
صفحه 30:
16005 OebGphere Ovssaye-Queuiegy
Gpstew
Receiving client
Program|
P-CC. Gerverd oryacization bP WBO's رنه سم موه syste.
Client's receive
queue
|
queue managers
Queue:
manager
Enterprise network بر
_~__——“To other remote
Send queue
Sending client Routing table
‘Queue
Program فسعت
MQ Interface (aw
Server
Stub pi
RPC Local network
(synchronous) ۱
Message passing
(asynchronous)
icpure 4
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, In. All rights reserved. 0
صفحه 31:
©)
Attribute Description
Transport type __| Determines the transport protocol to be used
FIFO delivery Indicates that messages are to be delivered in the order they are sent
Message length | Maximum length of a single message
Setup retry count | Specifies maximum number of retries to start up the remote MCA
Delivery retries | Maximum times MCA will try to put received message into queue
pure ٩-۰9 اه ومع associated wil:
wessaye choot aged.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2¢, (c) 2007 Prentice-Hall, Inc. Al rights reserved. 0-13
صفحه 32:
Alias table Routing table
tai [OMG] ۲7
az lamp] 0۷61
amp | $02
Alias table Routing table
TAT [oma] [OMA] sat
tA2[aMp] [omc] sot
0119 |
ome
amc
Alias table
Lai [OMA sat
Laz | OMC| |
رو رنه منهج 20) مه اه تمه سم ۲ ٩-006 مب
route fables cod choses.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, In. All rights reserved. 0
صفحه 33:
Primitive Description
MQopen | Open a (possibly remote) queue
MQclose | Close a queue
MQput Put a message into an opened queue
MQget Get a message from a (local) queue
igure P-CS. Prisviives لاور tc the
Wesstye-queuity ioterPace.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-
صفحه 34:
Duta Gtreucw
Stream synchronization
Multimedia server Client
Stream
decoder
: وج
QoS 005
Compressed control control
multimedia data
Network
dota لول اوه ره P-CO. @ qecerd architecture Por صرت
وه Duero
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2¢, (c) 2007 Prentice-Hall, Inc. Al rights reserved. 0-13
صفحه 35:
Properties Por Quatiy oP Gervice:
eB ke required bit rote ot whick data should be
trocsported.
© De wordt deloy voll 0 sessivd hos bed set up
٠ Dke word eod-to-eod dehy .
۰ هون بل deloy voricace, or jitter.
© De word ruedtrip delay.
2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227.
صفحه 36:
(0) يق ج00
Ele
8 8
Packet departs source fl
Packet arrives at buffer 0
Packet removed from buffer | گت 9 Fil] 8 0۵
Gap in playback
ja a a لتبلتقبي ةع
6 5 10 15 20
Time (sec)
igure 02-27 بجو <(1) . م8 a bubPer to reduce jitter.
1227.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2¢, (c) 2007 Prentice-Hall, Inc. Al rights reserved. 0-13
صفحه 37:
CxPororry ۵208 )6(
Lost packet
sent | [4] [2] [3)[4]|| [5] Ce) (7) [8] || (a) Geo) 311112۱ 13 [14] 1569
Delivered 2] [3] (4) 5) Cel 7) (2) ۲8 لكلا اكلا 152 ]3 14 ]5[ 6
Lost packet
Sent |[4][5][9][13]||[2] [6] fro] [14] |) (3) (7) ea) fs) | ل8 | لكا 12| 19
Delivered [7] [2] [B] [4] ]5[ )6[ ]70 ]8[ ]9[ 80 Gaal ]12 5} 14 88 9
Lost frames
0
igure ۰-۵0۰ ۰ لاه مه (م) و وا ملسم ۲و تسه
جوم لاه (ط) له مور
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0
صفحه 38:
Receiver's machine
Application
Procedure that reads
two audio data units for
each video data unit
Incoming stream A A
Network
igure P-CO. Dke pricvipte oP explicit svackrodizatios
vo the bevel date .كلك
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227.
صفحه 39:
Application tells
Receivers machine —_—s middleware what
to do with incoming
streams
Multimedia control
is part of middleware | | APPlication
Middleware layer —{
Incoming stream
Network
igure P-90. (ke pricviple oP spockrocizatioa os
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227.
صفحه 40:
End host
Router
Ali 10
50
۲ ___ 6م احج
5
7
40 دا ۳0
1 [Rb aan 1
Internet D
B
Overlay network
igure ۶4۵4۰ The rebtiog between tobe iad puerto
ood ontud oetwork-tevel routes.
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227.
صفحه 41:
۰. موق propucaion wodet
- Dede ® picks carter wde GQ و و
— Gubsequediy exchanges updates wit ©
٠ @pprouchkes to exckooyicy updates
= @ oly) pwshes its vw updates to GQ
= ody pulse to cew updotes Prow GQ
— Puc Q sec updates to euch vier
صفحه 42:
4ePorwuiod Dissewication Oodets (©)
k —
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
@rpure 02-26 . Vke relation betwee the Practiog امسو جام لصن تاه ج
wwdes ued the pornveter k it pure ری Phe graph displays )(
usu Puontivd oF .عا
‘Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-
