Communication. Distributed Systems IT332

Similar documents
Distributed Systems Principles and Paradigms. Chapter 04: Communication

Parallelism. Master 1 International. Andrea G. B. Tettamanzi. Université de Nice Sophia Antipolis Département Informatique

Distributed Systems Principles and Paradigms. Chapter 04: Communication

Chapter 4 Communication

Distributed Systems. Edited by. Ghada Ahmed, PhD. Fall (3rd Edition) Maarten van Steen and Tanenbaum

Chapter 4 Communication

Distributed Systems Principles and Paradigms

Chapter 4 Communication

Distributed Information Processing

Communication. Distributed Systems Santa Clara University 2016

Dr Markus Hagenbuchner CSCI319 SIM. Distributed Systems Chapter 4 - Communication

DISTRIBUTED COMPUTER SYSTEMS

Today CSCI Communication. Communication in Distributed Systems. Communication in Distributed Systems. Remote Procedure Calls (RPC)

Communication. Overview

Overview. Communication types and role of Middleware Remote Procedure Call (RPC) Message Oriented Communication Multicasting 2/36

Communication. Outline

Interprocess Communication Tanenbaum, van Steen: Ch2 (Ch3) CoDoKi: Ch2, Ch3, Ch5

Last Class: RPCs and RMI. Today: Communication Issues

Remote Invocation. Today. Next time. l Overlay networks and P2P. l Request-reply, RPC, RMI

IPC. Communication. Layered Protocols. Layered Protocols (1) Data Link Layer. Layered Protocols (2)

Communication in Distributed Systems

LECTURE 6: MESSAGE-ORIENTED COMMUNICATION II: MESSAGING IN DISTRIBUTED SYSTEMS

LECTURE 6: MESSAGE-ORIENTED COMMUNICATION II: MESSAGING IN DISTRIBUTED SYSTEMS. Lecture Contents

Advanced Topics in Distributed Systems. Dr. Ayman A. Abdel-Hamid. Computer Science Department Virginia Tech

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

SAI/ST course Distributed Systems

Distributed Systems Theory 4. Remote Procedure Call. October 17, 2008

Communication. Layered Protocols. Topics to be covered. Layered Protocols. Introduction

CSci Introduction to Distributed Systems. Communication: RPC

Distributed Systems Inter-Process Communication (IPC) in distributed systems

DISTRIBUTED COMPUTER SYSTEMS

Networked Systems and Services, Fall 2018 Chapter 4. Jussi Kangasharju Markku Kojo Lea Kutvonen

2017 Paul Krzyzanowski 1

Verteilte Systeme (Distributed Systems)

Distributed Systems COMP 212. Lecture 15 Othon Michail

Unit 2.

May Gerd Liefländer System Architecture Group Universität Karlsruhe (TH), System Architecture Group

Large Systems: Design + Implementation: Communication Coordination Replication. Image (c) Facebook

CS603: Distributed Systems

Distributed Systems Exam 1 Review. Paul Krzyzanowski. Rutgers University. Fall 2016

MOM MESSAGE ORIENTED MIDDLEWARE OVERVIEW OF MESSAGE ORIENTED MIDDLEWARE TECHNOLOGIES AND CONCEPTS. MOM Message Oriented Middleware

Advanced Distributed Systems

CS454/654 Midterm Exam Fall 2004

DS 2009: middleware. David Evans

COMP9243 Week 2 (08s1) Ihor Kuz, Felix Rauch, Manuel M. T. Chakravarty & Gernot Heiser

Outline. EEC-681/781 Distributed Computing Systems. The OSI Network Architecture. Inter-Process Communications (IPC) Lecture 4

Transport Layer (TCP/UDP)

Today CSCI Remote Method Invocation (RMI) Distributed Objects

Chapter 2 Distributed Computing Infrastructure

EEC-682/782 Computer Networks I

TSIN02 - Internetworking

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC)

Communication Paradigms

Interprocess Communication

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

Architecture of Software Intensive Systems

ECE 650 Systems Programming & Engineering. Spring 2018

OSI Transport Layer. objectives

Applied Networks & Security

Different Layers Lecture 20

Chapter IV INTERPROCESS COMMUNICATION. Jehan-François Pâris

Networking Technologies and Applications

Interprocess Communication

Verteilte Systeme (Distributed Systems)

Last Class: RPCs. Today:

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

Distributed Systems Lecture 2 1. External Data Representation and Marshalling (Sec. 4.3) Request reply protocol (failure modes) (Sec. 4.

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Internet Technology. 06. Exam 1 Review Paul Krzyzanowski. Rutgers University. Spring 2016

Internet Technology 3/2/2016

Distributed Systems. Chapter 02

Consistency and Replication (part b)

EEC-484/584 Computer Networks. Lecture 16. Wenbing Zhao

Networks and distributed computing

Remote Invocation. Today. Next time. l Indirect communication. l Request-reply, RPC, RMI

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

TSIN02 - Internetworking

Chapter 6. (Week 12) The Transport Layer (CONTINUATION) ANDREW S. TANENBAUM COMPUTER NETWORKS FOURTH EDITION PP

C19: User Datagram and Multicast

OSI and TCP/IP Models

User Datagram Protocol

CHAPTER 4: INTERPROCESS COMMUNICATION AND COORDINATION

02 - Distributed Systems

02 - Distributed Systems

Connections. Topics. Focus. Presentation Session. Application. Data Link. Transport. Physical. Network

Remote Procedure Calls

QUIZ: Longest Matching Prefix

Transport Protocols. ISO Defined Types of Network Service: rate and acceptable rate of signaled failures.

Indirect Communication

CHAPTER - 4 REMOTE COMMUNICATION

Different Layers Lecture 21

Chapter 2 Network Models 2.1

CSEP 561 Connections. David Wetherall

The OSI Model. Open Systems Interconnection (OSI). Developed by the International Organization for Standardization (ISO).

TSIN02 - Internetworking

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

TSIN02 - Internetworking

Computer Communication Networks Midterm Review

Middleware. Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004

Transcription:

Communication Distributed Systems IT332

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

3 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 T CP: 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, Email and SMTP

4 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

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

6 Transient vs Persistent Communication Transient communication: middleware discards a message if it cannot be delivered to receiver immediately (sender and receiver run at the same time based on request/response protocol, the message is expected otherwise it will be discarded) Example: applications using TCP (FTP),UDP(Video streaming) Persistent communication: messages are stored by middleware until receiver can accept it Receiving application need not be executing when the message is submitted. Example: Email

Synchronous vs Asynchronous Communication 7 Synchronous communication: sender blocks until its request is known to be accepted Sender and receiver must be active at the same time Sender execution is continued only if the previous message is received and processed. 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

8 Activity

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. Email) 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)

16 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

17 RPC RPC between a client and a server

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

19 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

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

21 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.

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

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

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

Message Oriented Transient Communication 25 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

26 Berkeley Sockets The socket primitives for TCP

Client Server Communication Using TCP Sockets 27

28 Message Queuing (MQ) Systems Also called Message Oriented Middleware (MOM): example :email system. Support asynchronous persistent communication Applications communicate by inserting messages in queues Messages can only be added to and retrieved from local queues: senders place messages in source queues, receivers retrieve messages from destination queues Message contains name or address of a destination queue MQ system provides queues to senders and receivers, transfers messages from source queue to destination queue Very similar to email but more general purpose (i.e., enables communication between applications and not just people)

29 Message Queuing Systems (continued) Basic interface to a queue in a message queuing system

General Architecture of a Message Queuing System 30 Message queuing system maintains a mapping of queue names to network locations

General Architecture of a Message Queuing System (continued) 31 Having each queue manager maintain a queue to location mapping is not scalable Routers can help achieve scalability Only routers need be updated when queues are added or removed. Queue manager only needs to know where the nearest router is.

32 Multicast Communication Application level multicasting Gossip based data dissemination

33 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..Join request continues to be forwarded. Q is already a forwarder for mid P becomes child of Q. No need to forward join request anymore.

34 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 <Ra, Rb> 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

35 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

36 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)