SlideShare a Scribd company logo
DistributedSystems
Asst.Prof.Dr.Satea Hikmat Alnajjar
Chapter Four: COMMUNIC ATION
By: Mustafa Saad
Layered Protocols (1)
Figure 4-1. Layers, interfaces, and protocols in the OSI
model.
Layered Protocols (2)
Figure 4-2. A typical message as it appears on the
network.
Middleware Protocols
Figure 4-3. An adapted reference model for
networked communication.
Types of Communication
Figure 4-4.Viewing middleware as an intermediate (distributed)
service in application-level communication.
Types of Communication
1) Client/Server computing is generally based on a model of transient
synchronous
communication:
•Client and server have to be active at time of communication.
•Client issues request and blocks until it receives reply.
•Server essentially waits only for incoming requests, and subsequently processes
them
Drawbacks of synchronous communication:
•Client cannot do any other work while waiting for reply.
•Failures have to be handled immediately: the client is waiting.
•The model may simply not be appropriate (mail, news)
2) Message-oriented middleware: asynchronous communication: Processes
send each other messages, which are queued
•Sender need not wait for immediate reply, but can do other things Middleware often
ensures fault tolerance
Conventional Procedure Call
Figure 4-5. (a) Parameter passing in a local procedure call: the stack before the
call to read. (b) The stack while the called procedure is active
tead(fd,buf,nbytes)
Basic RPC Operation
Figure 4-6. Principle of RPC between a client and server program.
RPC = Remote Procedure Calls
RPC Operation
Figure 4-7.The steps involved in a doing a remote computation through RPC.
Remote Procedure Calls (1)
A remote procedure call occurs in the following steps:
1. The client procedure calls the client stub.
2.The client stub builds a message and calls the local
operating system.
3. The client’s OS sends the message to the remote OS.
4. The remote OS gives the message to the server stub.
5.The server stub unpacks the parameters and calls the
server.
Continued …
Remote Procedure Calls (2)
6.The server does the work and returns the result to the
stub.
7.The server stub packs it in a message and calls its local
OS.
8. The server’s OS sends the message to the client’s OS.
9. The client’s OS gives the message to the client stub.
10.The stub unpacks the result and returns to the client.
Client - client stub - client OS – remote OS - server stub – server
Passing Value Parameters (2)
Figure 4-8. (a) The original message on the Pentium.
Passing by Reference
• Like passing a pointer or an array or by reference.
•The pointer or address has meaning within the same address
space.
•Call by reference is replaced by a copy/restore.
•Difference between input and output parameters.
•A remote reference mechanism enhances access
transparency
 Remote reference offers unified access to remote data (URI
in restful API)
 Remote references can be passed as parameter in
RPCs(passed in same URL)
 Note: stubs can sometimes be used as such references
Parameter Specification and Stub Generation
Figure 4-9. (a) A procedure. (b) The corresponding
message.
Asynchronous RPC (1)
Figure 4-10. (a) The interaction between client and server in a traditional RPC.
Asynchronous RPC (2)
Figure 4-10. (b) The interaction using asynchronous RPC.
Asynchronous RPC (3)
Figure 4-11. A client and server interacting through
two asynchronous RPCs.
Distributed Systems Distributed Systems- COMMUNICATION.pptx
Writing a Client and a Server (2)
Three files output by the IDL compiler:
•A header file (e.g., interface.h, in C terms).
•The client stub.
•The server stub.
Binding a Client to a Server (1)
•Registration of a server makes it possible for a client to
locate the server and bind to it.
• Server location is done in two steps:
1. Locate the server’s machine.
2. 2. Locate the server on that machine.
• The server also registers with the directory service by providing it
the network address of the server's machine and a name under
which the server can be looked up.
• How does the client stub find the server stub?
• Needs to know remote IP address/port no.
Binding a Client to a Server (2)
Figure 4-13. Client-to-server binding in DCE.
DCE = Distributed Computing Environment
RPC = Remote Procedure Calls
• Port mapper
• Daemon on server machine maintaining server
bindings
• Listens on a well-known port
• Server stub registers its port no. and service
name with port mapper
• Client gets this binding by querying port
mapper
Berkeley Sockets
Figure 4-14. The socket primitives for TCP/IP
.
Berkeley Sockets
Figure 4-14. The socket primitives for TCP/IP
.

More Related Content

PPT
DS-Chapter DDEFR2-Communication_105220.ppt
PPT
remote procedure calls
PDF
Cs556 section3
PDF
Cs556 section3
PPTX
CHP-4.pptx
PPT
Chapter 2B-Communication.ppt
PPTX
Middleware in Distributed System-RPC,RMI
PPTX
Chapter 2- distributed system Communication.pptx
DS-Chapter DDEFR2-Communication_105220.ppt
remote procedure calls
Cs556 section3
Cs556 section3
CHP-4.pptx
Chapter 2B-Communication.ppt
Middleware in Distributed System-RPC,RMI
Chapter 2- distributed system Communication.pptx

Similar to Distributed Systems Distributed Systems- COMMUNICATION.pptx (20)

DOCX
Remote Procedure Call
PDF
5. Distributed Operating Systems
PPTX
Remote procedure call
PPTX
RPC: Remote procedure call
PPT
Chapter 4 communication2
 
DOC
Remote procedure calls
PPTX
Dos(rpc)avishek130650107020
PPT
Communication primitives
PPT
2.communcation in distributed system
PPT
Rpc (Distributed computing)
PPT
Remote Procedure Call
PDF
Communication in Distributed Systems.pdf
PPTX
Remote procedure call on client server computing
PPT
Remote Procedure Call related to computer newtork.ppt
PPTX
CN_U3P2_RPC_design_issues.pptx,CN unit1pr1.pdf where it is useful for the thi...
PPT
Communication in Distributed System.ppt
PPTX
Communication in Distributed Systems
Remote Procedure Call
5. Distributed Operating Systems
Remote procedure call
RPC: Remote procedure call
Chapter 4 communication2
 
Remote procedure calls
Dos(rpc)avishek130650107020
Communication primitives
2.communcation in distributed system
Rpc (Distributed computing)
Remote Procedure Call
Communication in Distributed Systems.pdf
Remote procedure call on client server computing
Remote Procedure Call related to computer newtork.ppt
CN_U3P2_RPC_design_issues.pptx,CN unit1pr1.pdf where it is useful for the thi...
Communication in Distributed System.ppt
Communication in Distributed Systems
Ad

Recently uploaded (20)

PDF
Phone away, tabs closed: No multitasking
PPTX
artificialintelligencedata driven analytics23.pptx
PPT
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
PPTX
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
PPTX
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
DOCX
actividad 20% informatica microsoft project
PPTX
areprosthodontics and orthodonticsa text.pptx
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PPTX
building Planning Overview for step wise design.pptx
PDF
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
PPTX
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
PDF
Urban Design Final Project-Context
PPTX
YV PROFILE PROJECTS PROFILE PRES. DESIGN
PPTX
Fundamental Principles of Visual Graphic Design.pptx
PPTX
mahatma gandhi bus terminal in india Case Study.pptx
PPTX
12. Community Pharmacy and How to organize it
PDF
Interior Structure and Construction A1 NGYANQI
PPT
pump pump is a mechanism that is used to transfer a liquid from one place to ...
PPT
Package Design Design Kit 20100009 PWM IC by Bee Technologies
Phone away, tabs closed: No multitasking
artificialintelligencedata driven analytics23.pptx
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
actividad 20% informatica microsoft project
areprosthodontics and orthodonticsa text.pptx
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
building Planning Overview for step wise design.pptx
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
Urban Design Final Project-Context
YV PROFILE PROJECTS PROFILE PRES. DESIGN
Fundamental Principles of Visual Graphic Design.pptx
mahatma gandhi bus terminal in india Case Study.pptx
12. Community Pharmacy and How to organize it
Interior Structure and Construction A1 NGYANQI
pump pump is a mechanism that is used to transfer a liquid from one place to ...
Package Design Design Kit 20100009 PWM IC by Bee Technologies
Ad

Distributed Systems Distributed Systems- COMMUNICATION.pptx

  • 2. Layered Protocols (1) Figure 4-1. Layers, interfaces, and protocols in the OSI model.
  • 3. Layered Protocols (2) Figure 4-2. A typical message as it appears on the network.
  • 4. Middleware Protocols Figure 4-3. An adapted reference model for networked communication.
  • 5. Types of Communication Figure 4-4.Viewing middleware as an intermediate (distributed) service in application-level communication.
  • 6. Types of Communication 1) Client/Server computing is generally based on a model of transient synchronous communication: •Client and server have to be active at time of communication. •Client issues request and blocks until it receives reply. •Server essentially waits only for incoming requests, and subsequently processes them Drawbacks of synchronous communication: •Client cannot do any other work while waiting for reply. •Failures have to be handled immediately: the client is waiting. •The model may simply not be appropriate (mail, news) 2) Message-oriented middleware: asynchronous communication: Processes send each other messages, which are queued •Sender need not wait for immediate reply, but can do other things Middleware often ensures fault tolerance
  • 7. Conventional Procedure Call Figure 4-5. (a) Parameter passing in a local procedure call: the stack before the call to read. (b) The stack while the called procedure is active tead(fd,buf,nbytes)
  • 8. Basic RPC Operation Figure 4-6. Principle of RPC between a client and server program. RPC = Remote Procedure Calls
  • 9. RPC Operation Figure 4-7.The steps involved in a doing a remote computation through RPC.
  • 10. Remote Procedure Calls (1) A remote procedure call occurs in the following steps: 1. The client procedure calls the client stub. 2.The client stub builds a message and calls the local operating system. 3. The client’s OS sends the message to the remote OS. 4. The remote OS gives the message to the server stub. 5.The server stub unpacks the parameters and calls the server. Continued …
  • 11. Remote Procedure Calls (2) 6.The server does the work and returns the result to the stub. 7.The server stub packs it in a message and calls its local OS. 8. The server’s OS sends the message to the client’s OS. 9. The client’s OS gives the message to the client stub. 10.The stub unpacks the result and returns to the client. Client - client stub - client OS – remote OS - server stub – server
  • 12. Passing Value Parameters (2) Figure 4-8. (a) The original message on the Pentium.
  • 13. Passing by Reference • Like passing a pointer or an array or by reference. •The pointer or address has meaning within the same address space. •Call by reference is replaced by a copy/restore. •Difference between input and output parameters. •A remote reference mechanism enhances access transparency  Remote reference offers unified access to remote data (URI in restful API)  Remote references can be passed as parameter in RPCs(passed in same URL)  Note: stubs can sometimes be used as such references
  • 14. Parameter Specification and Stub Generation Figure 4-9. (a) A procedure. (b) The corresponding message.
  • 15. Asynchronous RPC (1) Figure 4-10. (a) The interaction between client and server in a traditional RPC.
  • 16. Asynchronous RPC (2) Figure 4-10. (b) The interaction using asynchronous RPC.
  • 17. Asynchronous RPC (3) Figure 4-11. A client and server interacting through two asynchronous RPCs.
  • 19. Writing a Client and a Server (2) Three files output by the IDL compiler: •A header file (e.g., interface.h, in C terms). •The client stub. •The server stub.
  • 20. Binding a Client to a Server (1) •Registration of a server makes it possible for a client to locate the server and bind to it. • Server location is done in two steps: 1. Locate the server’s machine. 2. 2. Locate the server on that machine. • The server also registers with the directory service by providing it the network address of the server's machine and a name under which the server can be looked up. • How does the client stub find the server stub? • Needs to know remote IP address/port no.
  • 21. Binding a Client to a Server (2) Figure 4-13. Client-to-server binding in DCE. DCE = Distributed Computing Environment RPC = Remote Procedure Calls • Port mapper • Daemon on server machine maintaining server bindings • Listens on a well-known port • Server stub registers its port no. and service name with port mapper • Client gets this binding by querying port mapper
  • 22. Berkeley Sockets Figure 4-14. The socket primitives for TCP/IP .
  • 23. Berkeley Sockets Figure 4-14. The socket primitives for TCP/IP .