DISTRIBUTED COMPUTER SYSTEMS

Similar documents
Communication. Distributed Systems Santa Clara University 2016

Chapter 4 Communication

Chapter 4 Communication

Distributed Information Processing

Chapter 4 Communication

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

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

Communication. Overview

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

Communication. Distributed Systems IT332

CHAPTER - 4 REMOTE COMMUNICATION

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

MODELS OF DISTRIBUTED SYSTEMS

Communication. Outline

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

MODELS OF DISTRIBUTED SYSTEMS

COMMUNICATION IN DISTRIBUTED SYSTEMS

Lecture 5: Object Interaction: RMI and RPC

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

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

Communication in Distributed Systems

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

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

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

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

02 - Distributed Systems

02 - Distributed Systems

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

Verteilte Systeme (Distributed Systems)

Distributed Systems Principles and Paradigms. Chapter 04: Communication

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

Verteilte Systeme (Distributed Systems)

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

SAI/ST course Distributed Systems

Lecture 06: Distributed Object

Module 3 - Distributed Objects & Remote Invocation

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

Distributed Systems Principles and Paradigms. Chapter 04: Communication

CS454/654 Midterm Exam Fall 2004

Today: Distributed Objects. Distributed Objects

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

DISTRIBUTED COMPUTER SYSTEMS

Communication in Distributed Systems

Distributed Systems 8. Remote Procedure Calls

Last Class: RPCs. Today:

Last Class: RPCs. Today:

Structured communication (Remote invocation)

Remote Procedure Calls

Distributed Systems. Chapter 02

Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods

Fault Tolerance. Distributed Systems IT332

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

Remote Invocation. 1. Introduction 2. Remote Method Invocation (RMI) 3. RMI Invocation Semantics

Distributed Systems are Everywhere!" CS162 Operating Systems and Systems Programming Lecture 22 Client-Server" Client-Server" Message Passing"

CSci Introduction to Distributed Systems. Communication: RPC

Chapter 8 Fault Tolerance

Chapter 5: Distributed objects and remote invocation

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

Remote Procedure Call

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

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

Distributed Systems. How do regular procedure calls work in programming languages? Problems with sockets RPC. Regular procedure calls

Remote Invocation. To do. Request-reply, RPC, RMI. q Today q. q Next time: Indirect communication

Distributed Systems. The main method of distributed object communication is with remote method invocation

CHAPTER 2. Introduction to Middleware Technologies

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

REMOTE PROCEDURE CALLS EE324

Architecture of Software Intensive Systems

416 Distributed Systems. RPC Day 2 Jan 11, 2017

Advanced Distributed Systems

CS603: Distributed Systems

Distributed Systems Principles and Paradigms

Communication Paradigms

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

RMI & RPC. CS 475, Spring 2019 Concurrent & Distributed Systems

Lecture 8: February 19

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC)

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

ECE 650 Systems Programming & Engineering. Spring 2018

Network Communication and Remote Procedure Calls

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

Remote Procedure Call (RPC) and Transparency

ANSAwise - Remote Procedure Call in Distributed Systems

Last Class: RPCs and RMI. Today: Communication Issues

Networks and distributed computing

416 Distributed Systems. RPC Day 2 Jan 12, 2018

UNIT IV -- TRANSPORT LAYER

Announcements. me your survey: See the Announcements page. Today. Reading. Take a break around 10:15am. Ack: Some figures are from Coulouris

Chapter 12 Network Protocols

19: Networking. Networking Hardware. Mark Handley

Jaringan Komputer. The Transport Layer

Distributed Information Processing

Today CSCI Remote Method Invocation (RMI) Distributed Objects

Distributed Systems. Lecture 06 Remote Procedure Calls Thursday, September 13 th, 2018

Chapter 8 Fault Tolerance

Transport Protocols. CSCI 363 Computer Networks Department of Computer Science

Electronic Mail

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

Chapter 09 Network Protocols

University of Pittsburgh Computer Science Department

Transcription:

DISTRIBUTED COMPUTER SYSTEMS Communication Fundamental REMOTE PROCEDURE CALL Dr. Jack Lange Computer Science Department University of Pittsburgh Fall 2015 Outline Communication Architecture Fundamentals Middleware Layer Types of Communications Transient, Asynchronous and Synchronous Remote Procedure Call Basic Operation Parameter Passing Parameter Specification and Stub Generation RPC Case Study: DCE Conclusion 1

Communication Fundamentals Layering, Middleware and Communication Types Protocol Architecture Layering Layers, interfaces, and protocols in the OSI model. 2

Layered Protocols Encapsulation A typical message as it appears on the network. Middleware Protocols A distinction can be made between high-level communication protocols and protocols establishing various middleware services Authentication service to prove a communication channel claimed identity Commit protocols to ensure atomicity Access control protocol through locks, for example Above protocols offer specific services, which are highly independent of any specific application Middleware communication protocols support high-level communications 3

Middleware Adapted Reference Model An adapted reference model for networked communication. Middleware Communication Alternatives The core of an electronic mail system can be seen as a middleware communication service, involving three major components: User agents Eudora, Outlook, Pine, Mail servers for incoming and outgoing messages Simple Mail Transfer Protocol: SMTP Outgoing Message Queue User Mailbox Mail SMTP Mail User Agent User Agent SMTP SMTP User Agent Mail User Agent User Agent User Agent 4

Middleware Communication Alternatives Viewing middleware as an intermediate, distributed, service in application-level communication. Middleware Communication Types Persistent Communication A transmitted message, is stored the communication middleware until deliver is successfully achieved Neither the sender or receiver application need be running after submitting the message Transient Communication Message is stored by communication system only as long as sender and receiver are executing Middleware is unable to deliver a message due transmission interrupt Transport-level communication service offer transient communication, Traditional store-and-forward, with possibility of packet dropping 5

Middleware Communication Types Synchronous Sender is blocked until its request is known to be delivered Synchronization can occur in three different ways Sender is blocked until it received notification from middleware that it took charge of the message Sender may synchronize until its request is received by intended recipient Sender waits until recipient returns response Asynchronous Sender continues execution, immediately after submitting message Message is temporarily stored by middleware upon submission REMOTE PROCEDURE CALL Basic Operation, Stubs, Parameter Passing 6

Remote Procedure Call Explicit message passing has been typically used in early distributed systems The paradigm does not achieve access transparency send() and receive() primitives do not conceal communication from the communicating entities Alternative method to message passing Allow programs to call procedures located in other machines Simple and elegant idea, but subtle problems may exist Procedure Call Basic Operation Conventional procedure call count = read(fd, buff, nbytes) fd = file descriptor, handle buff = an array of characters nbyte = number of bytes to be read The execution of a procedure call made from the main program requires the following steps: Caller pushes the parameters onto the stack in order, last one first, including return address The read() procedure puts return value in a register, removes return address and transfers control back to caller 7

Conventional Procedure Call Parameter passing in a local procedure call Stack before the call to read Stack while called procedure is active Parameter Passing Call-by-Value To the called procedure a value is just an initialized local variable Call-by-Reference The reference parameter is a pointer to a variable, rather than the value of the variable The called procedure modifies the variable in the calling procedure Call-by-Copy/Restore The variable is copied onto the stack by the caller and copied back after the call, overwriting the caller s original value Not often used in computer languages Which Mechanism to Use in RPC? 8

Remote Procedure Call Principle of RPC between a client and server program. RPC Design Issue Make RPC look like LPC, as much as possible Transparency Local procedure should not be aware that the called procedure is executing remotely RPC achieves its transparency in a similar way as LPC by invoking a library function call The execution of the RPC uses the concept of a stub A client stub, at the calling procedure A server stub, at the called procedure Communication between the stubs is achieved through message passing, transparently from the local procedure 9

Network 9/22/2015 RPC Information Flow Pack Parameters (Caller) (Callee) Call Return Return Call Stub Unpack Results Pack Results Stub Unpack Parameters Send Receive Send Receive Packet Handler Network Packet Handler Mbox Mbox RPC COMPILATION Interface Definition IDL Compiler Stub Header File Stub 10

RPC COMPILATION Interface Definition IDL Compiler Stub Header File Stub Code Language Compiler Application RPC COMPILATION Interface Definition IDL Compiler Code Stub Header File Stub Code Language Compiler Language Compiler Application Application 11

RPC Steps Example The steps involved in a doing a remote computation through RPC. RPC FAILURE HANDLING Failures can be of three types Lost message crash crash 12

RPC Details Equivalence with regular procedure call Parameters Request Message Result Reply message Name of Procedure Passed in request message Return Address client return mail box Where do stubs come from? Compiler generates stubs Input: interface definitions in an interface definition language (IDL) Contains, among other things, types of arguments/return Output: stub code in the appropriate source language code to pack and send message, wait for result, unpack result and return to caller Code to unpack message, call procedure, pack and send back results RPC Implementation Issues Cross-platform issues What if client/server machines are different architectures or in different languages? How does client know where to send call request? Biding process Need to translate name of remote service into network endpoint: network address, port number, possibly other information How to pass complex structures, pointers, big arrays? Handling these structure could be very costly, and perhaps impractical to pass as arguments Should there be limitation on size and types of RPC arguments?. 13

Passing Parameters Original Message Byte Address Original message on the sending machine Passing Parameters Upon Arrival The original message upon arrival on the receiving machine. 14

Passing Parameters Upon Conversion The message after being inverted at receiving machine Parameter Specification and Stub Generation Procedure Description Corresponding Message 15

Asynchronous RPC (2) The interaction using asynchronous RPC. Asynchronous RPC Interaction between client and server in a traditional RPC 16

Asynchronous RPC Two RPCs A client and server interacting through two asynchronous RPCs. Overcoming Lost Packets Timeout! Sends Request Retransmit Ack For Request Duplicate Request: Ignored 17

Overcoming Lost Packets Timeout! Sends Request Retransmit Ack For Request Reply Overcoming Lost Packets Timeout! Sends Request Retransmit Ack For Request Reply Ack For Reply 18

Costs in fault-tolerant version? Acknowledgments are expensive Must be avoided, when possible For example, if the reply can be sent quickly suppress the initial acknowledgement Retransmission is costly Try and tune the delay to be optimal For big messages, send packets in bursts and acknowledge a burst at a time, not burst by burst Big Packets Sends Request as a Burst Reply Ack Entire Burst Ack For Reply 19

RPC Semantics At most once: Request is processed 0 or 1 times Exactly once: Request is always processed 1 time At least once: Request is processed 1 or more times... but exactly once is impossible because we can t distinguish packet loss from true failures! In both cases, RPC protocol simply times out. REMOTE PROCEDURE CALL DCE Case Study 20

Writing a and a The steps in writing a client and a server in DCE RPC Writing a and a Three files output by the IDL compiler: A header file (e.g., interface.h, in C terms). The client stub. The server stub. 21

Binding a to a Registration of a server makes it possible for a client to locate the server and bind to it. location is done in two steps: 1. Locate the server s machine. 2. Locate the server on that machine. Binding a to a -to-server binding in DCE 22

Conclusion Communication Architecture Fundamentals Middleware Layer Types of Communications Transient, Asynchronous and Synchronous Remote Procedure Call Basic Operation Parameter Passing Parameter Specification and Stub Generation RPC Case Study: DCE 23