SlideShare a Scribd company logo
Chapter four
Communication
Objectives of the Chapter
• Review of how processes communicate in a network (the rules or the
protocols) and their structures
• Introduce most widely used communication models for distributed
systems:
• Network Protocols and Standards
• Remote Procedure Call (RPC) -which hides the details of
message passing and suitable for client-server models.
• Remote Object (Method) Invocation (RMI).invoking method from
other machine.
• Message-Oriented Middleware (MOM) -instead of the client-
server model, think in terms of messages and have a high level
message queuing model similar to e-mail
• Stream-Oriented Communication -for multimedia to support the
continuous flow of messages with timing constraints
• Multicast Communication -information dissemination for several
recipients.
• Web services - offering general services to remote applications
without immediate interactions from end users.
Introduction
• IPC is at the heart of all distributed systems
• communication in distributed systems is based on message
passing as offered by the underlying network as opposed to
using shared memory
• modern distributed systems consist of thousands of
processes scattered across an unreliable network such as
the Internet.
Network Protocols and Standards
• why communication in distributed systems? because there is
no shared memory
• two communicating processes must agree on the syntax and
semantics of messages
• a protocol is a set of rules that governs data communications,
a protocol defines :-
what is communicated,
how it is communicated,
when it is communicated
The key elements of a protocol are syntax, semantics, and timing
• syntax: refers to the structure or format of the data
• semantics: refers to the meaning of each section of bits
• timing: refers to when data should be sent and how fast they can
be sent.
Two computers, possibly from different manufacturers, must be
able to talk to each other due to standard model.
• The ISO-OSI model is a seven layer architecture. It defines
seven layers or levels in a complete communication system.
What is ISO-OSI protocol?
• OSI protocols are a family of standards for information
exchange. They consist of a set of rules that should
represent a standard for physical connections, cabling,
data formats, transmission models, as well as means to
ensure correction of errors and missing data.
 Physical: Physical characteristics of the media
Host (upper) Layers
Media (lower) Layers
 Data Link: Reliable data delivery across the link
 Network: Managing connections across the network
or routing
 Transport: End-to-end connection and reliability (handles
lost packets); TCP (connection-oriented),
UDP (connectionless), etc.
 Session: Managing sessions between applications
(dialog control and synchronization).
 Presentation: Data presentation to applications; concerned
with the syntax and semantics of the
information transmitted
 Application: Network services to applications; contains
protocols that are commonly needed by
users; FTP, HTTP, SMTP, ...
The interaction between layers in the OSI model
Physical layer
The physical layer is responsible for movements of
individual bits from one hop (node) to the next.
Data link layer
The data link layer is responsible for moving
frames from one hop (node) to the next.
Hop-to-hop delivery
Network layer
The network layer is responsible for the
delivery of individual packets from the source host to the
destination host.
Source-to-destination delivery
Transport layer
The transport layer is responsible for the delivery
of a message from one process to another.
Reliable process-to-process delivery of a message
Session layer
The session layer is responsible for dialog
control and synchronization.
Presentation layer
The presentation layer is responsible for translation,
compression, and encryption.
Application layer
The application layer is responsible for
providing services to the user.
Summary of layers
discussion between a receiver and a sender in the data link layer
 a conversation occurs between a sender and a receiver at each
layer
 e.g., at the data link layer
normal operation of TCP
assuming no messages are lost,
 the client initiates a setup
connection using a three-way
handshake (1-3)
 the client sends its request (4)
 it then sends a message to close
the connection (5)
 the server acknowledges receipt
and informs the client that the
connection will be closed down (6)
 then sends the answer (7)
followed by a request to close the
connection (8)
 the client responds with an ack to
finish conversation (9)
Transport Protocols: Client-Server TCP
transactional TCP
 much of the overhead in TCP is for managing the connection
 the client sends a single message
consisting of a setup request,
service request, and information
to the server that the connection
will be closed down immediately
after receiving the answer (1)
 the server sends acceptance of
connection request, the answer,
and a connection release (2)
 the client acknowledges tear
down of the connection (3)
 combine connection setup with
request and closing connection with
answer
 such protocol is called TCP for
Transactions (T/TCP)
Remote Procedure Call
• in 1984, Birrel and Nelson introduced a different way of handling
communication: RPC
• it allows a program to call a procedure located on another
machine
• simple and elegant, but there are implementation problems
– the calling and called procedures run in different address
spaces
– parameters and results have to be exchanged
– what if the machines are not identical?
– what happens if both machines crash?
principle of RPC between a client and server program
 Client and Server Stubs
 RPC would like to make a remote procedure call look the same
as a local one; it should be transparent, i.e., the calling procedure
should not know that the called procedure is executing on a
different machine or vice versa
 when a program is compiled, it uses different versions of library
functions called client stubs
 a server stub is the server-side equivalent of a client stub
 Steps of a Remote Procedure Call
1. Client procedure calls client stub in the normal way message
2. Client stub builds a message and calls the local OS (packing
parameters into a message is called parameter marshaling)
3. Client's OS sends the message to the remote OS
4. Remote OS gives the message to the server stub
5. Server stub unpacks the parameters and calls the server
6. Server does the work and returns the result to the stub
7. Server stub packs it in a message and calls the local OS
8. Server's OS sends the to the client's OS
9. Client's OS gives the message to the client stub
10. Stub unpacks the result and returns to client
 hence, for the client remote services are accessed by making
ordinary (local) procedure calls; not by calling send and receive.
steps involved in doing remote computation through RPC
 Parameter Passing
1. Passing Value Parameters
 e.g., consider a remote procedure add(i, j), where i and j are
integer parameters
2. Passing Reference Parameters
 assume the parameter is a pointer to an array
 copy the array into the message and send it to the server
 the server stub can then call the server with a pointer to this
array
 the server then makes any changes to the array and sends it
back to the client stub which copies it to the client
 this is in effect call-by-copy/restore
 optimization of the method
 one of the copy operations can be eliminated if the stub knows
whether the parameter is input or output to the server
 if it is an input to the server (e.g., in a call to write), it need not
be copied back
 if it is an output, it need not be sent over in the first place; only
send the size
 the above procedure can handle pointers to simple arrays and
structures, but difficult to generalize it to an arbitrary data
structure
Asynchronous RPC
 two cases
1. if there is no result to be returned
 e.g., adding entries in a database, ...
 the server immediately sends an ack promising that it will
carryout the request
 the client can now proceed without blocking
a) the interconnection between client and server in a traditional RPC
b) the interaction using asynchronous RPC
2. if the result can be collected later
 e.g., prefetching network addresses of a set of hosts, ...
 the server immediately sends an ack promising that it will
carryout the request
 the client can now proceed without blocking
 the server later sends the result
a client and server interacting through two asynchronous RPCs
• resulted from object-based technology that has proven its
value in developing non distributed applications
• it is an expansion of the RPC mechanisms
• it enhances distribution transparency as a consequence of
an object that hides its internal from the outside world by
means of a well-defined interface
• Distributed Objects
– an object encapsulates data, called the state, and the
operations on those data, called methods
– methods are made available through interfaces.
– the state of an object can be manipulated only by invoking
methods
Remote Object (Method) Invocation (RMI)
 the state of an object is not distributed, only the interfaces are;
such objects are also referred to as remote objects
 the implementation of an object’s interface is called a proxy
(analogous to a client stub in RPC systems)
 it is loaded into the client’s address space when a client binds to
a distributed object.
 tasks: a proxy marshals method invocation into messages and
unmarshals reply messages to return the result of the method
invocation to the client
 a server stub, called a skeleton, unmarshals messages and
marshals replies.
common organization of a remote object with client-side proxy
• RPCs and RMIs are not adequate for all distributed system
applications
• the provision of access transparency may be good but they
have semantics that is not adequate for all applications
• example problems
– they assume that the receiving side is running at the time of
communication
– a client is blocked until its request has been processed
Message Oriented Communication
 Persistence and Synchronicity in Communication
general organization of a communication system in which hosts are connected
through a network
 assume the communication system is organized as a computer
network shown below.
 communication can be
 persistent or transient
 asynchronous or synchronous
 persistent: a message that has been submitted for transmission is
stored by the communication system as long as it takes to deliver it
to the receiver
 e.g., email delivery
persistent communication of letters back in the days
of the Pony Express
 transient: a message that has been submitted for
transmission is stored by the communication system only as
long as the sending and receiving applications are executing.
 asynchronous: a sender continues immediately after it has
submitted its message for transmission.
 synchronous: the sender is blocked until its message is
stored in a local buffer at the receiving host or delivered to
the receiver
 in general there are six possibilities
persistent asynchronous
communication
 persistent synchronous
communication
receipt-based transient synchronous
communication
 transient asynchronous
communication
 response-based transient
synchronous communication
 delivery-based transient
synchronous communication at
message delivery
 the sender is blocked until the
message is delivered to the
receiver for further processing
 strongest form; the sender is
blocked until it receives a reply
message from the receiver
 Stream Oriented Communication
Types of Media are
 discrete media: text, executable code, graphics,
images; temporal relationships between data items are
not fundamental to correctly interpret the data
 continuous media: video, audio, animation; temporal
relationships between data items are fundamental to
correctly interpret the data
 a data stream is a sequence of data units and can be
applied to discrete as well as continuous media
 stream-oriented communication provides facilities for the
exchange of time-dependent information (continuous
media) such as audio and video streams.
• timing in transmission modes
– asynchronous transmission mode: data items are
transmitted one after the other, but no timing constraints;
e.g. text transfer
– synchronous transmission mode: a maximum end-to-end
delay defined for each data unit; it is possible that data can
be transmitted faster than the maximum delay, but not
slower
– isochronous transmission mode: maximum and minimum
end-to-end delay are defined; also called bounded delay
jitter; applicable for distributed multimedia systems
• a continuous data stream can be simple or complex
– simple stream: consists of a single sequence of data; e.g.,
mono audio, video only (only visual frames)
– complex stream: consists of several related simple streams
that must be synchronized; e.g., stereo audio, video
consisting of audio and video (may also contain subtitles,
Unicast, Broadcast versus Multicast
• Unicast
– One-to-one
– Destination – unique
receiver host address
• Broadcast
– One-to-all
– Destination – address of
network
• Multicast
– One-to-many
– Multicast group must be
identified
– Destination – address of
group
Key:
 Unicast transfer
 Broadcast transfer
 Multicast transfer
Thank you!!

More Related Content

Similar to CHP-4.pptx

Task communication
Task communicationTask communication
Task communication
1jayanti
 
Remote procedure calls
Remote procedure callsRemote procedure calls
Remote procedure calls
imnomus
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure callsAshish Kumar
 
Remoting and serialization
Remoting and serializationRemoting and serialization
Remoting and serialization
Chathurangi Shyalika
 
The OSI model
 The OSI model The OSI model
The OSI model
ShofiqulIslam38
 
CN unit 1 part 2 2023.ppt
CN unit 1 part 2 2023.pptCN unit 1 part 2 2023.ppt
CN unit 1 part 2 2023.ppt
mohanravi1986
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
Gd Goenka University
 
OSI MODEL
OSI MODEL OSI MODEL
OSI MODEL
Soumo Dhali
 
OSI and TCP/IP reference models in networking
OSI and TCP/IP reference models in networkingOSI and TCP/IP reference models in networking
OSI and TCP/IP reference models in networking
MeenakshiGupta233101
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
Sunita Sahu
 
Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3
Zakirul Islam
 
Iso model
Iso modelIso model
Iso model
Aileen Ereño
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systems
Aya Mahmoud
 
Chapter 3-Processes.ppt
Chapter 3-Processes.pptChapter 3-Processes.ppt
Chapter 3-Processes.ppt
sirajmohammed35
 
Cs556 section2
Cs556 section2Cs556 section2
Cs556 section2
farshad33
 
Cisco ccna certification knowledge to pass the exam
Cisco ccna certification knowledge to pass the examCisco ccna certification knowledge to pass the exam
Cisco ccna certification knowledge to pass the exam
le_dung762
 
Chap 2 network models
Chap 2 network modelsChap 2 network models
Chap 2 network models
Mukesh Tekwani
 
Distributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptxDistributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptx
ssuser376193
 
Distributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptxDistributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptx
ssuser376193
 

Similar to CHP-4.pptx (20)

Task communication
Task communicationTask communication
Task communication
 
Remote procedure calls
Remote procedure callsRemote procedure calls
Remote procedure calls
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
 
Remoting and serialization
Remoting and serializationRemoting and serialization
Remoting and serialization
 
The OSI model
 The OSI model The OSI model
The OSI model
 
CN unit 1 part 2 2023.ppt
CN unit 1 part 2 2023.pptCN unit 1 part 2 2023.ppt
CN unit 1 part 2 2023.ppt
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 
OSI MODEL
OSI MODEL OSI MODEL
OSI MODEL
 
Lecture9
Lecture9Lecture9
Lecture9
 
OSI and TCP/IP reference models in networking
OSI and TCP/IP reference models in networkingOSI and TCP/IP reference models in networking
OSI and TCP/IP reference models in networking
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3Protocol layer,OSI model & POP3
Protocol layer,OSI model & POP3
 
Iso model
Iso modelIso model
Iso model
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systems
 
Chapter 3-Processes.ppt
Chapter 3-Processes.pptChapter 3-Processes.ppt
Chapter 3-Processes.ppt
 
Cs556 section2
Cs556 section2Cs556 section2
Cs556 section2
 
Cisco ccna certification knowledge to pass the exam
Cisco ccna certification knowledge to pass the examCisco ccna certification knowledge to pass the exam
Cisco ccna certification knowledge to pass the exam
 
Chap 2 network models
Chap 2 network modelsChap 2 network models
Chap 2 network models
 
Distributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptxDistributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptx
 
Distributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptxDistributed Systems Distributed Systems- COMMUNICATION.pptx
Distributed Systems Distributed Systems- COMMUNICATION.pptx
 

Recently uploaded

A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 

Recently uploaded (20)

A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 

CHP-4.pptx

  • 2. Objectives of the Chapter • Review of how processes communicate in a network (the rules or the protocols) and their structures • Introduce most widely used communication models for distributed systems: • Network Protocols and Standards • Remote Procedure Call (RPC) -which hides the details of message passing and suitable for client-server models. • Remote Object (Method) Invocation (RMI).invoking method from other machine. • Message-Oriented Middleware (MOM) -instead of the client- server model, think in terms of messages and have a high level message queuing model similar to e-mail • Stream-Oriented Communication -for multimedia to support the continuous flow of messages with timing constraints • Multicast Communication -information dissemination for several recipients. • Web services - offering general services to remote applications without immediate interactions from end users.
  • 3. Introduction • IPC is at the heart of all distributed systems • communication in distributed systems is based on message passing as offered by the underlying network as opposed to using shared memory • modern distributed systems consist of thousands of processes scattered across an unreliable network such as the Internet.
  • 4. Network Protocols and Standards • why communication in distributed systems? because there is no shared memory • two communicating processes must agree on the syntax and semantics of messages • a protocol is a set of rules that governs data communications, a protocol defines :- what is communicated, how it is communicated, when it is communicated
  • 5. The key elements of a protocol are syntax, semantics, and timing • syntax: refers to the structure or format of the data • semantics: refers to the meaning of each section of bits • timing: refers to when data should be sent and how fast they can be sent. Two computers, possibly from different manufacturers, must be able to talk to each other due to standard model. • The ISO-OSI model is a seven layer architecture. It defines seven layers or levels in a complete communication system. What is ISO-OSI protocol? • OSI protocols are a family of standards for information exchange. They consist of a set of rules that should represent a standard for physical connections, cabling, data formats, transmission models, as well as means to ensure correction of errors and missing data.
  • 6.  Physical: Physical characteristics of the media Host (upper) Layers Media (lower) Layers  Data Link: Reliable data delivery across the link  Network: Managing connections across the network or routing  Transport: End-to-end connection and reliability (handles lost packets); TCP (connection-oriented), UDP (connectionless), etc.  Session: Managing sessions between applications (dialog control and synchronization).  Presentation: Data presentation to applications; concerned with the syntax and semantics of the information transmitted  Application: Network services to applications; contains protocols that are commonly needed by users; FTP, HTTP, SMTP, ...
  • 7. The interaction between layers in the OSI model
  • 8. Physical layer The physical layer is responsible for movements of individual bits from one hop (node) to the next.
  • 9. Data link layer The data link layer is responsible for moving frames from one hop (node) to the next.
  • 11. Network layer The network layer is responsible for the delivery of individual packets from the source host to the destination host.
  • 13. Transport layer The transport layer is responsible for the delivery of a message from one process to another.
  • 15. Session layer The session layer is responsible for dialog control and synchronization.
  • 16. Presentation layer The presentation layer is responsible for translation, compression, and encryption.
  • 17. Application layer The application layer is responsible for providing services to the user.
  • 19. discussion between a receiver and a sender in the data link layer  a conversation occurs between a sender and a receiver at each layer  e.g., at the data link layer
  • 20. normal operation of TCP assuming no messages are lost,  the client initiates a setup connection using a three-way handshake (1-3)  the client sends its request (4)  it then sends a message to close the connection (5)  the server acknowledges receipt and informs the client that the connection will be closed down (6)  then sends the answer (7) followed by a request to close the connection (8)  the client responds with an ack to finish conversation (9) Transport Protocols: Client-Server TCP
  • 21. transactional TCP  much of the overhead in TCP is for managing the connection  the client sends a single message consisting of a setup request, service request, and information to the server that the connection will be closed down immediately after receiving the answer (1)  the server sends acceptance of connection request, the answer, and a connection release (2)  the client acknowledges tear down of the connection (3)  combine connection setup with request and closing connection with answer  such protocol is called TCP for Transactions (T/TCP)
  • 22. Remote Procedure Call • in 1984, Birrel and Nelson introduced a different way of handling communication: RPC • it allows a program to call a procedure located on another machine • simple and elegant, but there are implementation problems – the calling and called procedures run in different address spaces – parameters and results have to be exchanged – what if the machines are not identical? – what happens if both machines crash?
  • 23. principle of RPC between a client and server program  Client and Server Stubs  RPC would like to make a remote procedure call look the same as a local one; it should be transparent, i.e., the calling procedure should not know that the called procedure is executing on a different machine or vice versa  when a program is compiled, it uses different versions of library functions called client stubs  a server stub is the server-side equivalent of a client stub
  • 24.  Steps of a Remote Procedure Call 1. Client procedure calls client stub in the normal way message 2. Client stub builds a message and calls the local OS (packing parameters into a message is called parameter marshaling) 3. Client's OS sends the message to the remote OS 4. Remote OS gives the message to the server stub 5. Server stub unpacks the parameters and calls the server 6. Server does the work and returns the result to the stub 7. Server stub packs it in a message and calls the local OS 8. Server's OS sends the to the client's OS 9. Client's OS gives the message to the client stub 10. Stub unpacks the result and returns to client  hence, for the client remote services are accessed by making ordinary (local) procedure calls; not by calling send and receive.
  • 25. steps involved in doing remote computation through RPC  Parameter Passing 1. Passing Value Parameters  e.g., consider a remote procedure add(i, j), where i and j are integer parameters
  • 26. 2. Passing Reference Parameters  assume the parameter is a pointer to an array  copy the array into the message and send it to the server  the server stub can then call the server with a pointer to this array  the server then makes any changes to the array and sends it back to the client stub which copies it to the client  this is in effect call-by-copy/restore  optimization of the method  one of the copy operations can be eliminated if the stub knows whether the parameter is input or output to the server  if it is an input to the server (e.g., in a call to write), it need not be copied back  if it is an output, it need not be sent over in the first place; only send the size  the above procedure can handle pointers to simple arrays and structures, but difficult to generalize it to an arbitrary data structure
  • 27. Asynchronous RPC  two cases 1. if there is no result to be returned  e.g., adding entries in a database, ...  the server immediately sends an ack promising that it will carryout the request  the client can now proceed without blocking a) the interconnection between client and server in a traditional RPC b) the interaction using asynchronous RPC
  • 28. 2. if the result can be collected later  e.g., prefetching network addresses of a set of hosts, ...  the server immediately sends an ack promising that it will carryout the request  the client can now proceed without blocking  the server later sends the result a client and server interacting through two asynchronous RPCs
  • 29. • resulted from object-based technology that has proven its value in developing non distributed applications • it is an expansion of the RPC mechanisms • it enhances distribution transparency as a consequence of an object that hides its internal from the outside world by means of a well-defined interface • Distributed Objects – an object encapsulates data, called the state, and the operations on those data, called methods – methods are made available through interfaces. – the state of an object can be manipulated only by invoking methods Remote Object (Method) Invocation (RMI)
  • 30.  the state of an object is not distributed, only the interfaces are; such objects are also referred to as remote objects  the implementation of an object’s interface is called a proxy (analogous to a client stub in RPC systems)  it is loaded into the client’s address space when a client binds to a distributed object.  tasks: a proxy marshals method invocation into messages and unmarshals reply messages to return the result of the method invocation to the client  a server stub, called a skeleton, unmarshals messages and marshals replies.
  • 31. common organization of a remote object with client-side proxy
  • 32. • RPCs and RMIs are not adequate for all distributed system applications • the provision of access transparency may be good but they have semantics that is not adequate for all applications • example problems – they assume that the receiving side is running at the time of communication – a client is blocked until its request has been processed Message Oriented Communication
  • 33.  Persistence and Synchronicity in Communication general organization of a communication system in which hosts are connected through a network  assume the communication system is organized as a computer network shown below.
  • 34.  communication can be  persistent or transient  asynchronous or synchronous  persistent: a message that has been submitted for transmission is stored by the communication system as long as it takes to deliver it to the receiver  e.g., email delivery persistent communication of letters back in the days of the Pony Express
  • 35.  transient: a message that has been submitted for transmission is stored by the communication system only as long as the sending and receiving applications are executing.  asynchronous: a sender continues immediately after it has submitted its message for transmission.  synchronous: the sender is blocked until its message is stored in a local buffer at the receiving host or delivered to the receiver  in general there are six possibilities
  • 37. receipt-based transient synchronous communication  transient asynchronous communication
  • 38.  response-based transient synchronous communication  delivery-based transient synchronous communication at message delivery  the sender is blocked until the message is delivered to the receiver for further processing  strongest form; the sender is blocked until it receives a reply message from the receiver
  • 39.  Stream Oriented Communication Types of Media are  discrete media: text, executable code, graphics, images; temporal relationships between data items are not fundamental to correctly interpret the data  continuous media: video, audio, animation; temporal relationships between data items are fundamental to correctly interpret the data  a data stream is a sequence of data units and can be applied to discrete as well as continuous media  stream-oriented communication provides facilities for the exchange of time-dependent information (continuous media) such as audio and video streams.
  • 40. • timing in transmission modes – asynchronous transmission mode: data items are transmitted one after the other, but no timing constraints; e.g. text transfer – synchronous transmission mode: a maximum end-to-end delay defined for each data unit; it is possible that data can be transmitted faster than the maximum delay, but not slower – isochronous transmission mode: maximum and minimum end-to-end delay are defined; also called bounded delay jitter; applicable for distributed multimedia systems • a continuous data stream can be simple or complex – simple stream: consists of a single sequence of data; e.g., mono audio, video only (only visual frames) – complex stream: consists of several related simple streams that must be synchronized; e.g., stereo audio, video consisting of audio and video (may also contain subtitles,
  • 41. Unicast, Broadcast versus Multicast • Unicast – One-to-one – Destination – unique receiver host address • Broadcast – One-to-all – Destination – address of network • Multicast – One-to-many – Multicast group must be identified – Destination – address of group Key:  Unicast transfer  Broadcast transfer  Multicast transfer