Interprocess Communication

Slides:



Advertisements
Similar presentations
Remote Procedure Call (RPC)
Advertisements

Distributed Objects and Remote Invocation
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Last Class: RPCs and RMI
Distributed Object & Remote Invocation Vidya Satyanarayanan.
Network Operating Systems Users are aware of multiplicity of machines. Access to resources of various machines is done explicitly by: –Logging into the.
L-7 RPC 1. Last Lecture Important Lessons - Naming Naming is a powerful tool in system design  A layer of indirection can solve many problems Name+context.
EECS122 - UCB 1 CS 194: Distributed Systems Remote Object Invocation, Message- Oriented Communications (Based on textbook slides) Computer Science Division.
Persistent and Transient Objects Persistent objects continue to exist even if they aren’t in the address space of a server process Transient objects existence.
CS 582 / CMPE 481 Distributed Systems Communications (cont.)
Chapter 2  Communication 1 Communication Chapter 2.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
Communication in Distributed Systems –Part 2
Univ. of TehranDistributed Operating Systems1 Advanced Operating Systems University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
An adapted reference model for networked communication.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W
1 Chapter 2. Communication. STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered Protocol But some other protocols.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 4 Communication.
Messaging is an important means of communication between two systems. There are 2 types of messaging. - Synchronous messaging. - Asynchronous messaging.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Message Oriented Communication Prepared by Himaja Achutha Instructor: Dr. Yanqing Zhang Georgia State University.
IS473 Distributed Systems CHAPTER 5 Distributed Objects & Remote Invocation.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Distributed Computing Systems
Distributed (Operating) Systems -Communication in Distributed Systems- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet.
AMQP, Message Broker Babu Ram Dawadi. overview Why MOM architecture? Messaging broker like RabbitMQ in brief RabbitMQ AMQP – What is it ?
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Communication Chapter 2.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
1 Chapter 2. Communication. STEMPusan National University STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
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.
RPC 6/14/20161BALAJI K - AP. Design issues of RPC Programming with interfaces Call Semantics associated with RPC Transparency and related to procedure.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Last Class: Introduction
Java Distributed Object System
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Prof. Leonardo Mostarda University of Camerino
Distributed Systems CS
Object-Oriented Network Communication (OOMI)
Processes Overview: Process Concept Process Scheduling
Last Class: RPCs and RMI
Message Based Communication
IPC and RPC.
Communication Chapter 2.
Inventory of Distributed Computing Concepts and Web services
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
DISTRIBUTED COMPUTING
Outline Communication Primitives - continued Theoretical Foundations
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Sarah Diesburg Operating Systems COP 4610
Process-to-Process Delivery:
Inventory of Distributed Computing Concepts
Multiple Processor Systems
Architectures of distributed systems Fundamental Models
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Architectures of distributed systems Fundamental Models
Layering & protocol stacks Johan Lukkien
Message Queuing.
Architectures of distributed systems Fundamental Models
Lecture 7: RPC (exercises/questions)
Distributed Systems CS
Last Class: Communication in Distributed Systems
Presentation transcript:

Interprocess Communication DS 2006; Ch 3 17-Jan-19 Interprocess Communication Remote invocations Message passing Streams Multicast Tanenbaum, van Steen: Ch2 (Ch3) CoDoKi: Ch2, Ch3, Ch5 Andrews: Ch 7-8 (-9) 17-Jan-19 Timo Alanko, 2006

DS 2006; Ch 3 17-Jan-19 Middleware Protocols General purpose services Naming, “browsing” Security Atomicity Higher-level communication RPC, RMI Message passing Reliable multicast An adapted reference model for networked communication. 17-Jan-19 Timo Alanko, 2006

Remote Procedure Calls DS 2006; Ch 3 17-Jan-19 Remote Procedure Calls Form: see Andrews, p. 363 Example: Andrews, Fig. 8.2 Notice: “passive” routines available for remote clients executed by a local worker process, which is invoked by the local infrastructure Implementation: see TvSt, Ch. 2.2 17-Jan-19 Timo Alanko, 2006

RPC goals to achieve access transparent procedure call cannot fully imitate naming, failures, performance global variables, context dependent variables, pointers Call-by-reference vs. call-by-value Call semantics Maybe, at-least-once, at-most-once Exception delivery Can be enhanced with other properties Asyncronous RPC Multicast, broadcast Location transparency, migration transparency, … Concurrent processing 17-Jan-19

RPC: a Schematic View System A System B X, Y, Z Y FNCT(a,b) c:={comp} DS 2006; Ch 3 17-Jan-19 RPC: a Schematic View System A System B X, Y, Z Y FNCT(a,b) c:={comp} return c. Thread P … Y=FNCT(X,Y) Y=FNCT(X,Y) a:=X; b:=Y; RPC package RPC package 17-Jan-19 Timo Alanko, 2006

Implementation of RPC (1) DS 2006; Ch 3 17-Jan-19 Implementation of RPC (1) RPC components (Bacon, Fig. 15.7) : RPC Service (two stubs) interpretation of the service interface packing of parameters for transportation Transportation service: node to node responsible for message passing part of the operating system Name service: look up, binding name of procedure, interface definition 17-Jan-19 Timo Alanko, 2006

Passing Value Parameters DS 2006; Ch 3 17-Jan-19 Passing Value Parameters Steps involved in doing remote computation through RPC 17-Jan-19 Timo Alanko, 2006

Writing a Client and a Server DS 2006; Ch 3 17-Jan-19 Writing a Client and a Server The steps in writing a client and a server in DCE RPC. 17-Jan-19 Timo Alanko, 2006

Binding a Client to a Server DS 2006; Ch 3 17-Jan-19 Binding a Client to a Server Client-to-server binding in DCE. 17-Jan-19 Timo Alanko, 2006

Implementation of RPC (2) DS 2006; Ch 3 17-Jan-19 Implementation of RPC (2) Server: who will execute the procedure? One server process infinite loop, waiting in “receive” call arrives : the process starts to execute one call at a time, no mutual exclusion problems A process is created to execute the procedure parallelism possible overhead mutual exclusion problems to be solved One process, a set of thread skeletons: one thread allocated for each call 17-Jan-19 Timo Alanko, 2006

Distributed Objects Remote Method Invocation ~ RPC; see Fig. 2-16. DS 2006; Ch 3 Distributed Objects 17-Jan-19 Remote Method Invocation ~ RPC; see Fig. 2-16. A distributed interface binding: download the interface to the client => proxy “server stub” ~ skeleton The object resides on a single machine (possible distribution: hidden) if needed: “object look” through an adapter (see: Fig. 3-8) an object may be persistent or transient Object references: typically: system-wide binding: implicit or explicit resolving of an object reference Binding and invocation: see Fig. 2-17 Examples: CORBA, DCOM (Ch. 9.1, 9.2) 17-Jan-19 Timo Alanko, 2006

DS 2006; Ch 3 17-Jan-19 Distributed Objects Fig. 2-16. Common organization of a remote object with client-side proxy. 17-Jan-19 Timo Alanko, 2006

Object Adapter Fig. 3-8. Organization of an object server supporting different activation policies. 17-Jan-19

Binding a Client to an Object DS 2006; Ch 3 17-Jan-19 Binding a Client to an Object Distr_object* obj_ref; //Declare a systemwide object reference obj_ref = …; // Initialize the reference to a distributed object obj_ref-> do_something(); // Implicitly bind and invoke a method (a) Distr_object objPref; //Declare a systemwide object reference Local_object* obj_ptr; //Declare a pointer to local objects obj_ref = …; //Initialize the reference to a distributed object obj_ptr = bind(obj_ref); //Explicitly bind and obtain a pointer to … // … the local proxy obj_ptr -> do_something(); //Invoke a method on the local proxy (b) Fig. 2-17. (a) Example with implicit binding using only global references (b) Example with explicit binding using global and local references 17-Jan-19 Timo Alanko, 2006

Parameter Passing Copying must not be hidden! Why? DS 2006; Ch 3 Parameter Passing 17-Jan-19 Fig. 2-18.The situation when passing an object by reference or by value. Copying must not be hidden! Why? 17-Jan-19 Timo Alanko, 2006

Design Issues Language independent interface definition DS 2006; Ch 3 17-Jan-19 Design Issues Language independent interface definition Exception handling Delivery guarantees RPC / RMI semantics maybe at-least-once at-most-once Transparency (algorithmic vs behavioral) 17-Jan-19 Timo Alanko, 2006

RPC: Types of failures client unable to locate server request message lost retransmit a fixed number of times before throwing an exception server crashes after receiving a request or reply message lost (cannot be told apart!) client resubmits request server choises re-execute procedure: service should be idempotent filter duplicates: server should hold on to results until acknowledged client crashes after sending a request orphan detection: reincarnations, expirations Reporting failures breaks transparency 17-Jan-19

Fault tolerance measures at-most- once retransmit reply yes at-least- once re-execute no maybe not appl invocation semantics Re-execute/ retransmit Duplicate filtering Retransmit request 17-Jan-19

CORBA shields applications from heterogeneous platform dependencies e.g., languages, operating systems, networking protocols, hardware 17-Jan-19

17-Jan-19

17-Jan-19

Communication: Message Passing DS 2006; Ch 3 17-Jan-19 Communication: Message Passing OS procedure send buffer kernel procedure receive A<=>B Node xxxxxxxxxx 10 Net OS Data Communication OS kernel Network kernel Process A Process B … X=f(..); send X to B ... … receive X from A Y=f(X); ... X: 10 X: 5 17-Jan-19 Timo Alanko, 2006

Binding (1) Structure of communication network DS 2006; Ch 3 17-Jan-19 Binding (1) Structure of communication network one-to-one (two partners, one shared channel) many-to-one (client-server) one-to-many, many-to-many (client-service; group communication) Types of message passing send, multicast, broadcast on any channel structure 17-Jan-19 Timo Alanko, 2006

Binding (2) Time of binding static naming (at programming time) DS 2006; Ch 3 17-Jan-19 Binding (2) Time of binding static naming (at programming time) dynamic naming (at execution time) explicit binding of channels implicit binding through name service 17-Jan-19 Timo Alanko, 2006

Persistence and Synchronicity in Communication (1) DS 2006; Ch 3 17-Jan-19 Persistence and Synchronicity in Communication (1) General organization of a communication system in which hosts are connected through a network 17-Jan-19 Timo Alanko, 2006

Persistence and Synchronicity in Communication (2) DS 2006; Ch 3 17-Jan-19 Persistence and Synchronicity in Communication (2) Persistent communication a submitted message is stored in the system until delivered to the receiver (the receiver may start later, the sender may stop earlier) Transient communication a message is stored only as long as the sending and receiving applications are executing (the sender and the receiver must be executing in parallel) 17-Jan-19 Timo Alanko, 2006

Persistence and Synchronicity in Communication (3) DS 2006; Ch 3 17-Jan-19 Persistence and Synchronicity in Communication (3) Persistent communication of letters back in the days of the Pony Express. 17-Jan-19 Timo Alanko, 2006

Persistence and Synchronicity in Communication (4) DS 2006; Ch 3 17-Jan-19 Persistence and Synchronicity in Communication (4) Asynchronous communication the sender continues immediately after submission Synchronous communication the sender is blocked until the message is stored at the receiving host (receipt-based synchrony) the message is delivered to the receiver (delivery based) the response has arrived (response based) 17-Jan-19 Timo Alanko, 2006

Persistence and Synchronicity in Communication (5) DS 2006; Ch 3 17-Jan-19 Persistence and Synchronicity in Communication (5) Persistent asynchronous communication Persistent synchronous communication 17-Jan-19 Timo Alanko, 2006

Persistence and Synchronicity in Communication (6) DS 2006; Ch 3 17-Jan-19 Persistence and Synchronicity in Communication (6) Transient asynchronous communication Receipt-based transient synchronous communication 17-Jan-19 Timo Alanko, 2006

Persistence and Synchronicity in Communication (7) DS 2006; Ch 3 17-Jan-19 Persistence and Synchronicity in Communication (7) Delivery-based transient synchronous communication at message delivery Response-based transient synchronous communication 17-Jan-19 Timo Alanko, 2006

The Message-Passing Interface (MPI) DS 2006; Ch 3 17-Jan-19 The Message-Passing Interface (MPI) Traditional communication: sockets Platform of concern: high-performance multicomputers Issue: easy-to-use communication for applications Sockets? No: wrong level, non-suitable protocols a new message passing standard: MPI designed for parallel applications, transient communication no communication servers no failures (worth to be recovered from) 17-Jan-19 Timo Alanko, 2006

The Message-Passing Interface (MPI) DS 2006; Ch 3 17-Jan-19 The Message-Passing Interface (MPI) Primitive Meaning MPI_bsend Append outgoing message to a local send buffer MPI_send Send a message and wait until copied to local or remote buffer MPI_ssend Send a message and wait until receipt starts MPI_sendrecv Send a message and wait for reply MPI_isend Pass reference to outgoing message, and continue MPI_issend Pass reference to outgoing message, and wait until receipt starts MPI_recv Receive a message; block if there are none MPI_irecv Check if there is an incoming message, but do not block Some of the most intuitive message-passing primitives of MPI. 17-Jan-19 Timo Alanko, 2006

Message-Queuing Model (1) DS 2006; Ch 3 17-Jan-19 Message-Queuing Model (1) 2-26 Four combinations for loosely-coupled communications using queues. 17-Jan-19 Timo Alanko, 2006

Message-Queuing Model (2) DS 2006; Ch 3 17-Jan-19 Message-Queuing Model (2) Primitive Meaning Put Append a message to a specified queue Get Block until the specified queue is nonempty, and remove the first message Poll Check a specified queue for messages, and remove the first. Never block. Notify Install a handler to be called when a message is put into the specified queue. Basic interface to a queue in a message-queuing system. 17-Jan-19 Timo Alanko, 2006

General Architecture of a Message-Queuing System (1) DS 2006; Ch 3 17-Jan-19 General Architecture of a Message-Queuing System (1) The relationship between queue-level addressing and network-level addressing. 17-Jan-19 Timo Alanko, 2006

General Architecture of a Message-Queuing System (2) DS 2006; Ch 3 17-Jan-19 General Architecture of a Message-Queuing System (2) 2-29. The general organization of a message-queuing system with routers. 17-Jan-19 Timo Alanko, 2006

Message oriented middleware appl. A appl. B asyncronous messages reliable, fault-tolerant no loss, duplication, permutation, cluttering persistent subscriptions models supported message queue request-response multicast publish-subscribe Q1 msg queue server msg transfer system SSL tms msg queue server msg transfer system Q2 appl. C 17-Jan-19

MOM = message oriented middleware basic model: pipe between client and server asyncronous messaging natural, syncronous communication cumbersome message queues support reliability of message transport violates access transparency, no support for data heterogenity unless in programming language mapping, no support for transactions suitable for event notifications, publish/subscribe-based architectures persistent message queues support fault tolearance Topics for variation and development persistent/transient msgs FIFO/priority queues translations of msgs abstractions on msg ordering multithreading, automatic load balancing msg routing (source, cost, changes in topology etc) secure transfer of msgs (at least between msg servers) 17-Jan-19

DS 2006; Ch 3 17-Jan-19 Message Brokers The general organization of a message broker in a message-queuing system. 17-Jan-19 Timo Alanko, 2006

CORBA Events & Notifications Event namespace (names and attributes) Typed events (header+body; fixed + other) Consumer event filtering, event batching, event priority, event expiration, logging, internationalization, flow control mechanism QoS properties event channel consumer1 supplier1 ... ... supplierN consumerN typed events filter n constraints 17-Jan-19

Publish-subscribe shared mailbox, everyone can send to it subscribers can select what filter to use guaranteed delivery of all relevant messages to all subscribers models: header-based, topic-based problems scalability: comparing filters and messages ordering of messages 17-Jan-19

Stream communication Setting up a stream between two processes across a network. 17-Jan-19

Specifying QoS (1) A flow specification. Characteristics of the Input Service Required maximum data unit size (bytes) Token bucket rate (bytes/sec) Toke bucket size (bytes) Maximum transmission rate (bytes/sec) Loss sensitivity (bytes) Loss interval (sec) Burst loss sensitivity (data units) Minimum delay noticed (sec) Maximum delay variation (sec) Quality of guarantee A flow specification. 17-Jan-19

Specifying QoS (2) The principle of a token bucket algorithm. 17-Jan-19

Setting Up a Stream The basic organization of RSVP for resource reservation in a distributed system. 17-Jan-19

Synchronization Mechanisms (1) The principle of explicit synchronization on the level data units. 17-Jan-19

Synchronization Mechanisms (2) 2-41 The principle of synchronization as supported by high-level interfaces. 17-Jan-19

Other forms of communication Multicast (application level) overlay network where relays not members of group (tree, mesh) Gossip-based data dissemination infect other nodes with useful data by an epidemic algorithm periodically exchange information with a random node states: infected, suspectible, data removed 17-Jan-19