Communication. Overview

Similar documents
Communication. Outline

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

Last Class: RPCs. Today:

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

Communication. Distributed Systems Santa Clara University 2016

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

Last Class: RPCs and RMI. Today: Communication Issues

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

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

Distributed Systems. Communication (2) Lecture Universität Karlsruhe, System Architecture Group

Distributed Systems. Communication (2) Schedule of Today. Distributed Objects. Distributed Objects and RMI. Corba IDL Example

DISTRIBUTED COMPUTER SYSTEMS

Distributed Systems. Chapter 02

Verteilte Systeme (Distributed Systems)

Last Class: RPCs. Today:

Distributed Information Processing

Chapter 4 Communication

Distributed Systems Principles and Paradigms. Chapter 04: Communication

Distributed Systems Principles and Paradigms. Chapter 04: Communication

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

Today CSCI Remote Method Invocation (RMI) Distributed Objects

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

Chapter 4 Communication

Distributed Object-Based Systems The WWW Architecture Web Services Handout 11 Part(a) EECS 591 Farnam Jahanian University of Michigan.

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

Distributed Systems Principles and Paradigms

Communication Basics, RPC & RMI. CS403/534 Distributed Systems Erkay Savas Sabanci University

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

DISTRIBUTED COMPUTER SYSTEMS

Chapter 4 Communication

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC)

SAI/ST course Distributed Systems

Communication. Distributed Systems IT332

Distributed Systems COMP 212. Lecture 15 Othon Michail

MTAT Enterprise System Integration. Lecture 2: Middleware & Web Services

Advanced Distributed Systems

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

Architecture of Software Intensive Systems

CHAPTER - 4 REMOTE COMMUNICATION

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

Communication. Communication. Distributed Systems. Networks and protocols Sockets Remote Invocation Messages Streams. Fall /10/2001 DoCS

DS 2009: middleware. David Evans

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

CSci Introduction to Distributed Systems. Communication: RPC

Today: Distributed Objects. Distributed Objects

Module 3 - Distributed Objects & Remote Invocation

EEC-682/782 Computer Networks I

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

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

MODELS OF DISTRIBUTED SYSTEMS

Communication in Distributed Systems

COMMUNICATION IN DISTRIBUTED SYSTEMS

MODELS OF DISTRIBUTED SYSTEMS

Lecture 5: Object Interaction: RMI and RPC

Message Passing vs. Distributed Objects. 5/15/2009 Distributed Computing, M. L. Liu 1

Architecture of Distributed Systems

Transport Layer (TCP/UDP)

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

ECE 650 Systems Programming & Engineering. Spring 2018

Indirect Communication

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

Verteilte Systeme (Distributed Systems)

Real-Time Protocol (RTP)

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

Today: Distributed Middleware. Middleware

CS454/654 Midterm Exam Fall 2004

Multimedia Networking

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

Different Layers Lecture 21

Distributed Middleware. Distributed Objects

ECE 650 Systems Programming & Engineering. Spring 2018

Communication Paradigms

Protocol Specification. Using Finite State Machines

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

Chapter 15: Distributed Communication. Sockets Remote Procedure Calls (RPCs) Remote Method Invocation (RMI) CORBA Object Registration

Lecture 8: February 19

Interprocess Communication

Electronic Payment Systems (1) E-cash

Distributed Information Processing

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Dr. Jack Lange Computer Science Department University of Pittsburgh. Fall Distributed System Definition. A distributed system is

03 Remote invoaction. Request-reply RPC. Coulouris 5 Birrel_Nelson_84.pdf RMI

Indirect Communication

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

Outline. Interprocess Communication. Interprocess Communication. Communication Models: Message Passing and shared Memory.

Advanced Topics in Operating Systems

Chapter 6. The Transport Layer. The Transport Service. Services Provided to the Upper Layers. Transport Service Primitives (3) 10/7/2010

Distributed Systems Principles and Paradigms

Distributed Systems 8. Remote Procedure Calls

TSIN02 - Internetworking

Diagram of Process State Process Control Block (PCB)

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

Chapter 3: Client-Server Paradigm and Middleware

xkcd.com End To End Protocols End to End Protocols This section is about Process to Process communications.

Internet Services & Protocols. Quality of Service Architecture

Simple Object Access Protocol (SOAP) Reference: 1. Web Services, Gustavo Alonso et. al., Springer

Process Concept. Chapter 4: Processes. Diagram of Process State. Process State. Process Control Block (PCB) Process Control Block (PCB)

Chapter 4: Processes

Chapter 4: Processes

Distributed Systems. Pre-Exam 1 Review. Paul Krzyzanowski. Rutgers University. Fall 2015

Transcription:

Communication Chapter 2 1 Overview Layered protocols Remote procedure call Remote object invocation Message-oriented communication Stream-oriented communication 2

Layered protocols Low-level layers Transport layer Application layer Middleware layer 3 OSI reference model Bits organized into frames specification and implementation of bits, Error and flow control transmission between sender and receiver Focus on message passing Not all functionality needed 4

Typical message 5 Data Link Protocol example 6

OSI reference model 2-1 Provides communication facilities for Handles distributed packet systems routing 7 Transport layer Provides actual communication facilities to distributed systems Standard protocols TCP: transmission control protocol Connection oriented Reliable Stream-oriented UDP: universal datagram protocol Unreliable (best effort) Data gram oriented 8

Client-Server TCP examples TCP T/TCP for transactions 9 Observations Many application protocols are directly implemented via the transport protocols Examples: News: nntp file transfer: ftp WWW: http New layer: middleware Provide common services to distributed applications 10

Middleware Protocols An adapted reference model for networked communication 11 Middleware layer Rich set of communication protocols Marshalling of data Naming Security Scaling mechanism 12

Understanding RPC Conventional Procedure Call: main program calls read parameters are pushed onto stack 13 Remote Procedure Call Client and Server Stubs 14

Steps of a Remote Procedure Call 1. Client procedure calls client stub in normal way 2. Client stub builds message, calls local OS 3. Client's OS sends message to remote OS 4. Remote OS gives message to server stub 5. Server stub unpacks parameters, calls server 6. Server does work, returns result to the stub 7. Server stub packs it in message, calls local OS 8. Server's OS sends message to client's OS 9. Client's OS gives message to client stub 10. Stub unpacks result, returns to client 15 RPC illustration 16

Passing Parameters? a) Original message on a Pentium b) The message after receipt on a SPARC c) The message after being inverted parameter marshalling 17 Parameter Specification and Stub Generation client and server need to agree on: function name & parameters data representations (encoding) formalized as : interface IDL: interface definition language automatic generation of client stubs help with creation of server stubs 18

other RPC model: Door server process is on same computer 19 Asynchronous RPC (1) synchronous asynchronous 20

Asynchronous RPC (2) two asynchronous RPCs complete logic 21 Example: DCE RPC Distributed Computing Environment Developed by Open Software Foundation Adopted by Microsoft Services Distributed file service Directory service Security service Distributed time service 22

Distributed Computing Environment RPC system Binds client to server Handles message transport Handles data type conversions Allows independence Programming language Operating system Platform 23 Writing a Client and a Server The steps in writing a client and a server in DCE RPC 24

Binding a Client to a Server Client-to-server binding in DCE 25 Remote Object Invocation Proxy/Skeleton instead of stub 26

Different distributed objects Compile-time object Vs. Run-time object Transient object Vs. Persistent object object exists and is fully defined via class/interface class/interface is implemented by run-time construct does object exist beyond lifetime of server 27 Client to object binding Object reference Denotes server, object, protocol Client loads associated stub Binding Explicit Implicit: done automatically 28

Examples: Binding a Client to an Object Distr_object* obj_ref; obj_ref = ; obj_ref-> do_something(); Distr_object objpref; Local_object* obj_ptr; obj_ref = ; obj_ptr = bind(obj_ref); obj_ptr -> do_something(); (a) (b) //Declare a systemwide object reference // Initialize the reference to a distributed object // Implicitly bind and invoke a method //Declare a systemwide object reference //Declare a pointer to local objects //Initialize the reference to a distributed object //Explicitly bind and obtain a pointer to the local proxy //Invoke a method on the local proxy a) implicit binding using only global references b) explicit binding using global and local references 29 Object reference implementations Similar to endpoint managed by daemon May contain URL of implementation file (server, object) pair sufficient Need protocol to load and instantiate code Remote-object references enable call-by-reference semantics 30

Static Remote method invocation Interface and its methods are known Class to proxy is compiled into client code Dynamic Interface and its methods are looked up at run time Method invocation is composed at run time 31 Parameter Passing The situation when passing an object by reference or by value 32

Example I: DCE Distributed-Object Model remote object invocation done via RPC 33 Example II: Java RMI Java enables object distribution via RMI Interface mechanism is part of language Registry service allows naming and lookup of objects rmic compiler generates proxies and skeletons Parameter passing: By value: via serialization By reference: via remote object reference 34

Part II Message-oriented communication Synchronous vs. asynchronous Message queuing systems Message brokers Stream-oriented communication 35 Synchronous communication Client and server are active Clients sends and blocks Server waits for request, then processes Drawbacks: Client cannot do other work while waiting Failures have to be dealt with immediately Model to rigid for most distributed applications (mail, news) 36

Asynchronous communication Processes send messages which are queued Send need not wait for immediate reply Middleware often ensures fault tolerance 37 General organization 38

Persistent: Persistent vs. transient Message is stored at a communications server as long as it takes to deliver Transient: Message is discarded by a communications server as soon as it cannot be delivered 39 Persistent communication: the Pony Express 40

Persistent Asynchronous Communication 41 Persistent Synchronous Communication 42

Transient Asynchronous Communication 43 Receipt-based transient synchronous communication 44

Delivery-based transient synchronous communication at message delivery 45 Response-based transient synchronous communication 46

Message oriented transient communication Typically built on top of simple transport layer message model Examples: Berkeley sockets Message-passing interface (MPI) 47 Berkeley Sockets primitives server Primitive Meaning client Socket Create a new communication endpoint 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(write) some data over the connection Receive Receive(read) some data over the connection Close Release the connection 48

Berkeley Sockets communication pattern 49 MPI: Message-passing interface High-performance computers COW & MPP Reliable high-speed interconnect Message is sent to unique process Process belongs to group (groupid, processid) 50

MPI primitives Primitive MPI_bsend MPI_send MPI_ssend MPI_sendrecv MPI_isend MPI_issend MPI_recv MPI_irecv Meaning Append outgoing message to a local send buffer Send a message and wait until copied to local or remote buffer Send a message and wait until receipt starts Send a message and wait for reply Pass reference to outgoing message, and continue Pass reference to outgoing message, and wait until receipt starts Receive a message; block if there are none Check if there is an incoming message, but do not block 51 Message oriented persistent communication Message queuing systems Message-oriented middleware Example: IBM MQSeries 52

Message-Queuing model Message are inserted into queue Message is forwarded from queue to queue Message is read from queue Example: SMTP mail 53 Message-Queuing Model scenarios 54

Message-Queuing Model primitives Primitive Put Get Poll Notify Meaning Append a message to a specified queue Block until the specified queue is nonempty, and remove the first message Check a specified queue for messages, and remove the first. Never block. Install a handler to be called when a message is put into the specified queue. 55 Message-Queuing System architecture Potential bottleneck 56

Message-Queuing System architecture 2-29 Improvement: Routers 57 Message-Queuing models Observation: Assume common messaging protocol Same structure and data representation Solution: Message broker Centralized component to transform messages May provide subject-based routing Acts much like application gateway 58

Message Brokers 59 IBM MQSeries concepts Message sent/received via queues Queues have Queue manager Queue managers connected via unidirectional channel pairs Message channel agent (MCA) at each channel endpoint: Setup channel via transport layer (un)wrap messages to/from transport layer packets Send/receive packets 60

IBM MQSeries illustration 2-31 61 MCA details Attribute Transport type FIFO delivery Message length Setup retry count Delivery retries Description Determines the transport protocol to be used Indicates that messages are to be delivered in the order they are sent Maximum length of a single message Specifies maximum number of retries to start up the remote MCA Maximum times MCA will try to put received message into queue 62

Message Transfer illustration Additional concepts: alias and routing 63 Message Queue Interface (MQI) Primitive MQopen MQclose MQput MQget Description Open a (possibly remote) queue Close a queue Put a message into an opened queue Get a message from a (local) queue 64

Stream-oriented communication Support for continuous media Time dependent Multimedia Streams in distributed systems Stream management 65 Continuous media Values are time dependent: Audio Video Animation Sensor data Transmission modes: Asynchronous: without time restrictions Synchronous: defined max delay Isochronous: defined max and min delay 66

Continuous data stream Connection-oriented communication facility that supports isochronous data transmission Unidirectional: single source, single sink Source or sink may be device wrapper Stream types: Simple: single flow of data Complex: multiple data flows substreams 67 Data Stream illustration 68

Data Stream between two devices 69 Multicast Data Stream 70

QoS: Quality of Service Token bucket algorithm: Tokens added at constant rate if bucket full, tokens will be dropped Tokens removed for transmission of data units 71 QoS: Flow specification Characteristics of the Input maximum data unit size (bytes) Token bucket rate (bytes/sec) Token bucket size (bytes) Maximum transmission rate (bytes/sec) Service Required Loss sensitivity (bytes) Loss interval (µsec) Burst loss sensitivity (data units) Minimum delay noticed (µsec) Maximum delay variation (µsec) Quality of guarantee Better: flow classification with reasonable defaults Ex: audio, video 72

Quality of service Flow specification is translated into resource allocation: Bandwidth Buffers Processing capacity 73 Example: RSVP protocol Steps: Sender sends flow spec to receiver Received sends reservation requests back Sender sends data stream Resource reservation protocol (RSVP) 74

Problem: Stream Synchronization Complex stream with substreams Time dependency between substream Slide show with music Video with audio Stereo audio 75 Synchronization Mechanisms 1/2 based on transmission units 76

Synchronization Mechanisms 2/2 based on middleware interface 77