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

Similar documents
Communication. Outline

Communication. Overview

Verteilte Systeme (Distributed Systems)

Last Class: RPCs. Today:

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

Last Class: RPCs. Today:

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

Communication. Distributed Systems Santa Clara University 2016

Distributed Information Processing

Today CSCI Remote Method Invocation (RMI) Distributed Objects

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

Chapter 4 Communication

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

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

Chapter 4 Communication

Module 3 - Distributed Objects & Remote Invocation

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

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

SAI/ST course Distributed Systems

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

Distributed Systems. Chapter 02

CHAPTER - 4 REMOTE COMMUNICATION

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

DISTRIBUTED COMPUTER SYSTEMS

Chapter 4 Communication

Last Class: RPCs and RMI. Today: Communication Issues

Communication. Distributed Systems IT332

Architecture of Software Intensive Systems

Diagram of Process State Process Control Block (PCB)

Lecture 5: Object Interaction: RMI and RPC

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

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

Advanced Topics in Operating Systems

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC)

The Big Picture So Far. Chapter 4: Processes

Communication in Distributed Systems

The Big Picture So Far. Chapter 4: Processes

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

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

Chapter 4: Processes

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

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

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

Chapter 4: Processes. Process Concept

Today: Distributed Objects. Distributed Objects

Distributed Systems COMP 212. Lecture 15 Othon Michail

Architecture of Distributed Systems

Chapter 10 DISTRIBUTED OBJECT-BASED SYSTEMS

Distributed Information Processing

CSci Introduction to Distributed Systems. Communication: RPC

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

Processes. Operating System Concepts with Java. 4.1 Sana a University, Dr aimen

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

Lecture 06: Distributed Object

Chapter 3: Processes. Chapter 3: Processes. Process in Memory. Process Concept. Process State. Diagram of Process State

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

Interprocess Communication

Distributed Middleware. Distributed Objects

Process. Program Vs. process. During execution, the process may be in one of the following states

Part Two - Process Management. Chapter 3: Processes

Distributed Systems Principles and Paradigms. Chapter 04: Communication

Object-based distributed systems. INF 5040/9040 autumn Lecturer: Frank Eliassen

Distributed Systems Principles and Paradigms. Distributed Object-Based Systems. Remote distributed objects. Remote distributed objects

CHAPTER 2. Introduction to Middleware Technologies

Desarrollo de Aplicaciones en Red. El modelo de comunicación. General concepts. Models of communication. Message Passing

Middleware and Interprocess Communication

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

Lecture 15: Network File Systems

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

Distributed Systems Principles and Paradigms. Chapter 04: Communication

Processes. CSE 2431: Introduction to Operating Systems Reading: Chap. 3, [OSC]

Chapter 5: Processes & Process Concept. Objectives. Process Concept Process Scheduling Operations on Processes. Communication in Client-Server Systems

Distributed Objects. Object-Oriented Application Development

Chapter 4: Processes. Process Concept

Collaboration of Tasks

A Report on RMI and RPC Submitted by Sudharshan Reddy B

Processes. Electrical and Computer Engineering Stephen Kim ECE/IUPUI RTOS & Apps 1

Chapter 4: Processes

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

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 22: Remote Procedure Call (RPC)

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

DISTRIBUTED COMPUTER SYSTEMS

Chapter 4: Processes. Process Concept. Process State

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

CS 403/534 Distributed Systems Midterm April 29, 2004

Today: Distributed Middleware. Middleware

Unit 7: RPC and Indirect Communication

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

Chapter 3: Process Concept

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

Lecture 2 Process Management

DISTRIBUTED COMPUTING

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

Chapter 3: Processes. Operating System Concepts 8 th Edition,

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

JAVA RMI. Remote Method Invocation

Chapter 5: Distributed objects and remote invocation

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

CHAPTER 3 - PROCESS CONCEPT

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

Transcription:

Advanced Topics in Distributed Systems Dr. Ayman A. Abdel-Hamid Computer Science Department Virginia Tech Communication (Based on Ch2 in Distributed Systems: Principles and Paradigms, 1/E or Ch4 in 2/E) Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 1 Outline Interprocess Communication in distributed systems Communication Models Remote Procedure Call (RPC) Remote Method Invocation (RMI) Message-Oriented Middleware Streams Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 2 1

RPC: Conventional Procedure Call count = read (fd, buf, nbytes); a) Parameter passing in a local procedure call: the stack before the call to read b) The stack while the called procedure is active Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 3 Client and Server Stubs Principle of RPC between a client and server program. Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 4 2

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 Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 5 Passing Value Parameters Steps involved in doing remote computation through RPC 2-8 Steps involved in doing remote computation through RPC Passing reference parameters? Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 6 3

Parameter Specification and Stub Generation Both sides follow the same protocol Message format (parameter marshalling) Representation of simple data structures Actual exchange of messages Implementation of client and server stubs Interfaces specified by an Interface Definition Language (IDL) Interface compiled into a client stub and a server stub (with compile-time and run-time interfaces) Through an IDL compiler Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 7 Asynchronous RPC 1/2 2-12 a) The interconnection between client and server in a traditional RPC b) The interaction using asynchronous RPC Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 8 4

Asynchronous RPC 2/2 A client and server interacting through two asynchronous RPCs Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 9 Distributed Objects Common organization of a remote object with client-side proxy. Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 10 5

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) Example with implicit binding using only global references (b) Example with explicit binding using global and local references Implementation of object references? Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 11 Static versus Dynamic RMI 1/2 Client bound to an object Invoke object s methods through proxy (RMI) RMI supports system-wide object references Object-specific stubs Object interface provided through IDL Use an object-based language (such as Java) to handle stub generation automatically Static invocation use predefined interface definitions Object s interface known when client application developed If interface changes, client application recompiled Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 12 6

Static versus Dynamic RMI 2/2 Dynamic invocation Compose a method invocation at runtime Application selects at runtime which method it will invoke at a remote object invoke (object, method, input_parameters, output_parameters) Static: fobject.append(int) Dynamic: invoke(fobject,id(append),int) Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 13 RMI: Parameter Passing The situation when passing an object by reference or by value. Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 14 7

Message-Oriented Communication Inherent synchronous nature of RPC and RMI Messaging Synchronous Sender blocked until message stored in a local buffer at receiving host or actually delivered to receiver (could block until message processed) Asynchronous Sender continues immediately after message submitted for transmission Message stored in communication system Persistent (email) Message stored by communication system as long as it takes to deliver to receiver Transient (store-and-forward routers, sockets) Message stored by communication system only as long as the sending and receiving application are executed Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 15 Persistence and Synchronicity in Communication 1/4 2-20 General organization of a communication system in which hosts are connected through a network Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 16 8

Persistence and Synchronicity in Communication 2/4 2-22.1 a) Persistent asynchronous communication b) Persistent synchronous communication Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 17 Persistence and Synchronicity in Communication 3/4 2-22.2 c) Transient asynchronous communication d) Receipt-based transient synchronous communication Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 18 9

Persistence and Synchronicity in Communication 4/4 e) Delivery-based transient synchronous communication at message delivery f) Response-based transient synchronous communication Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 19 General Architecture of a Message-Queuing System 1/2 The relationship between queue-level addressing and network-level addressing. Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 20 10

General Architecture of a Message-Queuing System 2/2 2-29 The general organization of a message-queuing system with routers. Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 21 Message Brokers 2-30 The general organization of a message broker in a message-queuing system. Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 22 11

Stream-Oriented Communication Timing is a problem Support for continuous media (temporal relationships between different data items are important to correctly interpret what the data means) Data streams transmission modes Asynchronous Synchronous (maximum end-to-end delay for each unit in a data stream) Isochronous (on-time, maximum and minimum end-to-end delay, bounded jitter) Need for QoS Communication Dr. Ayman Abdel-Hamid, CS6204, Sp08 23 12