 Communication Distributed Systems IT332. Outline  Fundamentals  Layered network communication protocols  Types of communication  Remote Procedure.

Slides:



Advertisements
Similar presentations
1 Communication in Distributed Systems REKs adaptation of Tanenbaums Distributed Systems Chapter 2.
Advertisements

RPC Robert Grimm New York University Remote Procedure Calls.
Remote Procedure Call (RPC)
CCNA – Network Fundamentals
Dr. Kalpakis CMSC621 Advanced Operating Systems Communication.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Last Class: RPCs and RMI
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
EECS122 - UCB 1 CS 194: Distributed Systems Remote Object Invocation, Message- Oriented Communications (Based on textbook slides) Computer Science Division.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
1 Java Networking – Part I CS , Spring 2008/9.
CS 582 / CMPE 481 Distributed Systems Communications (cont.)
CS 582 / CMPE 481 Distributed Systems Communications (cont.)
Centralized Architectures
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
Outcomes What is RPC? The difference between conventional procedure call and RPC? Understand the function of client and server stubs How many steps could.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
EECS122 - UCB 1 CS 194: Distributed Systems Communication Protocols, RPC Computer Science Division Department of Electrical Engineering and Computer Sciences.
An adapted reference model for networked communication.
Communication. Asynchronous RPC (1) a)The interconnection between client and server in a traditional RPC b)The interaction using asynchronous RPC 2-12.
Messaging Passing Communication AOS Dan Huang. Why Need Message RPC and ROI hiding communication for transparency. Hiding communication is not an appropriate.
Message-Oriented Communication Synchronous versus asynchronous communications Message-Queuing System Message Brokers Example: IBM MQSeries 02 – 26 Communication/2.4.
Gursharan Singh Tatla Transport Layer 16-May
Multicast Communication Multicast is the delivery of a message to a group of receivers simultaneously in a single transmission from the source – The source.
Process-to-Process Delivery:
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
Communication (II) Chapter 4
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Communication. 4.1 Fundamentals 4.2 Remote Procedure Call 4.3 Message-oriented Communication 4.4 Stream-oriented Communication 4.5 Multicast Communication.
SEED Infotech Pvt. Ltd. 1 Networking in Java. SEED Infotech Pvt. Ltd. 2 Objectives of This Session Describe issues related to any type of network using.
Communication Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Distributed Systems Principles and Paradigms Chapter 02 Communication 00 – 1.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Distributed (Operating) Systems -Communication in Distributed Systems- Fall 2011 Kocaeli University Computer Engineering Department.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Chapter 4: Interprocess Communication‏ Pages
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 4 Communication.
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved RPC Tanenbaum.
Network Protocols n ISO OSI 7-layer model n TCP/IP suite l TCP/UDP l IP l Ethernet/Token Ring l ICMP.
Interfaces and Services Each layer provides a service to the layer above it. A service is a set of primitive operations. Under UNIX, primitives are implemented.
Distributed Computing Systems
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
1 Conventional Procedure Call read(fd,buf,nbytes) a)Parameter passing in a local procedure call: the stack before the call to read b)The stack while the.
Distributed (Operating) Systems -Communication in Distributed Systems- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet.
Remote Procedure Call RPC
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Communication Chapter 2.
OS2-SUT– Sem ; R. Jalili Communication Chapter 2.
Communication Chapter 2.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Communication Chapter 2. Layered Protocols (1) Layers, interfaces, and protocols in the OSI model. 2-1.
Process-to-Process Delivery:
OS2-Sharif University of Technology - Sem ; R. Jalili Communication Chapter 2.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
Prof. Leonardo Mostarda University of Camerino
Distributed Systems CS
Communication Chapter 2.
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Process-to-Process Delivery:
Distributed Systems CS
Process-to-Process Delivery: UDP, TCP
Communication.
Transport Layer 9/22/2019.
Distributed Systems CS
Presentation transcript:

 Communication Distributed Systems IT332

Outline  Fundamentals  Layered network communication protocols  Types of communication  Remote Procedure Call  Message‐Oriented Communication  Multicast Communication 2

Layered Network Communication Protocols  Low‐level layers  Physical layer: transmitting bits between sender and receiver  Data link layer: transmitting frames over a link, error detection and correction  Network layer: routing of packets between source host and destination host  IP – Internet’s network layer protocol  Transport layer: process‐to‐process communication  TCP and UDP ‐Internet’s transport layer protocols  TPC: connection‐oriented, reliable communication  UDP: connectionless, unreliable communication  Higher‐level layers  Session and presentation layers are not present in the Internet protocol suite  Application layer contains applications and their protocols  E.g.,Web and HTTP, and SMTP 3

Middleware Layer  Middleware provides common services and protocols that can be used by many different applications  High‐level communication services, e.g., RPC, multicasting  Security protocols, e.g., authentication protocols, authorization protocols  Distributed locking protocols for mutual exclusion  Distributed commit protocols 4

Types of Communication  Transient vs. persistent communication  Synchronous vs. asynchronous communication 5

Transient vs Persistent Communication  Transient communication: middleware discards a message if it cannot be delivered to receiver immediately  Example: TCP,UDP  Persistent communication: messages are stored by middleware until receiver can accept it  Receiving application need not be executing when the message is submitted.  Example: 6

Synchronous vs Asynchronous Communication  Synchronous communication: sender blocks until its request is known to be accepted  Sender and receiver must be active at the same time  Three places for synchronization  Asynchronous communication: sender continues execution immediately after sending a message  Message stored by middleware upon submission  Message may be processed later at receiver’s convenience 7

 Activity 8

9 A. Persistent asynchronous communication B. Persistent synchronous communication C. Transient asynchronous communication D. Transient synchronous communication

10 A. Persistent asynchronous communication B. Persistent synchronous communication C. Transient asynchronous communication D. Transient synchronous communication

11 A. Persistent asynchronous communication B. Persistent synchronous communication C. Transient asynchronous communication D. Transient synchronous communication

12 A. Persistent asynchronous communication B. Persistent synchronous communication C. Transient asynchronous communication D. Transient synchronous communication

Persistence and Synchronization Combinations 13 a)Persistent asynchronous communication (e.g. ) b)Persistent synchronous communication

Persistence and Synchronization Combinations 14 c)Transient asynchronous communication (one way RPC, e.g. UDP) d)Receipt-based transient synchronous communication

Persistence and Synchronization Combinations 15 e)Delivery-based transient synchronous communication at message delivery(asynchronous RPCs) f)Response-based transient synchronous communication (RPCs)

Remote Procedure Call (RPC)  Replace the explicit message passing model with the model of executing a procedure call on a remote node  Synchronous ‐ based on blocking messages  Message‐passing details hidden from application  Procedure call parameters used to transmit data  Client calls local “stub” which does messaging and marshaling  Example RPC frameworks: SUNRPC,DCE RPC, XML‐RPC, SOAP 16

RPC 17 RPC between a client and a server

Basic RPC Operation Client program calls client stub. 2. Client stub packs parameters into message (marshaling), calls local OS. 3. Client's OS sends message to remote OS. 4. Remote OS delivers message to server stub. 5. Server stub unpacks message, calls server procedure. 6. Server does work, returns result to stub. 7. Server stub packs result in message, calls local OS. 8. Server's OS sends message to client's OS. 9. Client's OS delivers message to client stub 10. Client stub unpacks result (unmarshalling), returns to client program.

Parameter Marshalling  Client/server stub must pack (“marshal”) parameters/result into message structure  May have to perform other conversions when processes on heterogeneous architectures communicate:  Byte order (big endian vs little endian)  Dealing with pointers  Convert everything to standard (“network”)format, or  Message indicates format, receiver converts if necessary 19

Parameter Marshalling  Message data must be pointer free  Cannot pass pointers  all by reference becomes copy-restore 20

Other RPC Models  Conventional RPC: client blocks until a reply is returned  Asynchronous RPC  No need to wait for a reply when there is no result to return  RPC returns as soon as the server acknowledges receipt of the message  Deferred synchronous RPC  Client needs a reply but reply isn’t needed immediately  Use two asynchronous RPCs: server sends reply via another asynchronous RPC  One‐way RPC (a variant of asynchronous RPC)  Client does not even wait for an ACK from the server  Limitation: client cannot know for sure whether its request will be processed. 21

Asynchronous RPC 22 (a)The interaction between client and server in a traditional RPC. (b)The interaction using asynchronous RPC

Deferred Synchronous RPC 23 A client and server interacting through two asynchronous RPCs

Message‐Oriented Communication  Message‐Oriented Transient Communication  Berkeley sockets  Message‐Oriented Persistent Communication  Message‐queuing systems 24

Message‐Oriented Transient Communication  Many distributed systems/applications are built on top of simple message‐oriented model offered by the transport layer  Berkeley sockets: a standard interface of the transport layer 25

Berkeley Sockets 26 The socket primitives for TCP

Client‐Server Communication Using TCP Sockets 27

Multicast Communication  Application‐level multicasting  Gossip‐based data dissemination 28

Application‐Level Multicasting  Basic idea: organize nodes of a distributed system into an overlay network and use that network to disseminate data  Multicast tree construction in Chord  Initiator of multicast session generates a multicast identifier mid  Lookup succ(mid)  Request is routed to succ(mid), which will become the root  If P wants to join, it executes Lookup(mid) to send a join request to the root. P becomes a forwarder.  When request arrives at Q  Q has not seen a join request for mid before  it becomes forwarder; P becomes child of Q..Jion request continues to be forwarded.  Q is already a forwarder for mid  P becomes child of Q. No need to forward join request anymore. 29

Application‐Level Multicasting  Metrics to measure the quality of a multicast tree:  Link stress: how often does a multicast message cross the same physical link? Example: message sent by A needs to cross twice  Stretch: ratio in delay between overlay path and network‐level path. Example: message from B to C follow path of length 71 in overlay but 47 at network‐level => stretch = 71/47=1.51.  Tree cost: total cost of links in the tree 30

Gossip‐Based Data Dissemination  Use epidemic algorithm to rapidly propagate information among a large collection of nodes with no central coordinator  Assume all updates for a specific data item are initiated at a single node  Upon an update, try to “infect” other nodes as quickly as possible  Pair‐wise exchange of updates (like pair‐wise spreading of a disease)  Eventually, each update should reach every node  Terminology:  Infected node: node with an update it is willing to spread  Susceptible node: node that is not yet updated 31

Propagation Models  Anti‐entropy: each node regularly chooses another node at random, and exchanges updates, leading to identical states at both afterwards  Gossiping: A node which has just been updated (i.e., infected), tells a number of other nodes about its update (infecting them as well) 32