CSci Introduction to Distributed Systems. Communication: RPC

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

CHAPTER - 4 REMOTE COMMUNICATION

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

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

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

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

Remote Procedure Call

416 Distributed Systems. RPC Day 2 Jan 11, 2017

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC)

416 Distributed Systems. RPC Day 2 Jan 12, 2018

Last Class: RPCs. Today:

RMI: Design & Implementation

RPC. Remote Procedure Calls. Robert Grimm New York University

Remote Procedure Calls

Operating Systems. 18. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Spring /20/ Paul Krzyzanowski

Lecture 5: Object Interaction: RMI and RPC

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

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

Communication. Distributed Systems Santa Clara University 2016

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

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

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

SAI/ST course Distributed Systems

Lecture 06: Distributed Object

Lightweight RPC. Robert Grimm New York University

Communication. Overview

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

Operating System Support

Distributed Systems 8. Remote Procedure Calls

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

CSCI-1680 RPC and Data Representation. Rodrigo Fonseca

CORBA (Common Object Request Broker Architecture)

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

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

5 Distributed Objects: The Java Approach

Lecture 15: Network File Systems

Last Class: RPCs. Today:

COS 318: Operating Systems. Message Passing. Kai Li and Andy Bavier Computer Science Department Princeton University

Chapter 4 Communication

Chapter 5: Remote Invocation. Copyright 2015 Prof. Amr El-Kadi

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

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

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

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

Communication. Distributed Systems IT332

Today: Distributed Objects. Distributed Objects

Structured communication (Remote invocation)

Lecture 5: RMI etc. Servant. Java Remote Method Invocation Invocation Semantics Distributed Events CDK: Chapter 5 TVS: Section 8.3

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

Distributed Systems. Chapter 02

Remote Invocation Vladimir Vlassov and Johan Montelius

9. Queued Transaction Processing

RPC flow. 4.3 Remote procedure calls IDL. RPC components. Procedure. Program. sum (j,k) int j,k; {return j+k;} i = sum (3,7); Local procedure call

Lecture 8: February 19

Remote Procedure Call (RPC) and Transparency

Today CSCI Remote Method Invocation (RMI) Distributed Objects

Administrivia. Remote Procedure Calls. Reminder about last time. Building up to today

How do modules communicate? Enforcing modularity. Modularity: client-server organization. Tradeoffs of enforcing modularity

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

CSCI-1680 RPC and Data Representation. Rodrigo Fonseca

CS551 Object Oriented Middleware (I) Outline. Computer Networks. Computer Networks. Types of Middleware TCP UDP

Chapter 5 Remote Invocation. Gandeva Bayu Satrya, ST., MT. Telematics Labz. Informatics Department Telkom

Chapter 5: Distributed objects and remote invocation

Networks and Operating Systems Chapter 3: Remote Procedure Call (RPC)

Architecture of Software Intensive Systems

Lecture 8: February 17

MODELS OF DISTRIBUTED SYSTEMS

CS153: Communication. Chengyu Song. Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian

C 1. Recap: Finger Table. CSE 486/586 Distributed Systems Remote Procedure Call. Chord: Node Joins and Leaves. Recall? Socket API

MODELS OF DISTRIBUTED SYSTEMS

Building up to today. Remote Procedure Calls. Reminder about last time. Threads - impl

REMOTE PROCEDURE CALLS EE324

COMMUNICATION IN DISTRIBUTED SYSTEMS

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

A Report on RMI and RPC Submitted by Sudharshan Reddy B

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

RPC Paradigm. Lenuta Alboaie Andrei Panu

CS533 Concepts of Operating Systems. Jonathan Walpole

DISTRIBUTED COMPUTER SYSTEMS

CSCI-1680 RPC and Data Representation John Jannotti

ANSAwise - Remote Procedure Call in Distributed Systems

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

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

CS454/654 Midterm Exam Fall 2004

Communication Paradigms

Verteilte Systeme (Distributed Systems)

Transport Layer (TCP/UDP)

Slides for Chapter 5: Remote Invocation

Architecture of Distributed Systems

Chapter 4: Processes

Slides on cross- domain call and Remote Procedure Call (RPC)

Distributed Systems Middleware

Contents. Java RMI. Java RMI. Java RMI system elements. Example application processes/machines Client machine Process/Application A

Distributed Systems. 5. Remote Method Invocation


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

Distributed Systems. 03. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Fall 2017

EEC-682/782 Computer Networks I

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

Distributed Systems Principles and Paradigms. Chapter 04: Communication

Transcription:

CSci 5105 Introduction to Distributed Systems Communication: RPC

Today Remote Procedure Call Chapter 4 TVS

Last Time Architectural styles RPC generally mandates client-server but not always

Interprocess Communication Building block for centralized, network, and distributed OS Low-level primitives shared-memory: same machine, 4061, message-passing: 4061/5103

Layering

Protocol In force at every layer Protocol Details data format <GET> <PATH> <VERSION> exchange sequence both sides must speak same language

Transport Layer TCP connection-oriented; reliable 2-way stream, (http, ftp, ) built on it UDP connectionless, unreliable (corruption, collisions, buffer space, out of order arrival, ) every packet carries destination address both layered on IP (network layer)

Message Passing sender/receiver in different address space (same or different machine) send: user msg (contiguous) copied into OS network buffer, then OS sends it receive: msg received from network by OS into network buffer, then copied to user msg blocking vs. non-blocking Low-level: addresses, special primitives

Higher-level IPC Hide more details Remote procedure call (RPC) Message-bus Events Streams

Remote Procedure Call Let s look at a regular procedure call Key idea: use a stack to transfer information; same address space

Remote Procedure Call Retain procedure call look and feel send/receive are too low level: no transparency main () { send (dest_addr, ); } Synchronous: request-reply communication

Remote Procedure Call Transparency do_rpc (add, param1, param2) add (param1, param2)

Remote Procedure Call RPC: procedure can be on same or different machine (diff. address space) no shared stack/memory Client and server stubs are needed for transparency add must be a local procedure why? add is a stub stubs within both client and server processes

Binding Now does stub know/obtain server name/address? full discussion of binding issue is deferred until naming discussion

Client and Server Stubs client stub server stub

The Plumbing client computer server computer client process server process local call local return marshal args demarshal args send request receive reply receive request send reply demarshal args select procedure marshal results exec proc return client client communication stub system procedure (req/reply comm) (builds req. msg, gets server address) dispatcher (uses serviceid in msg) server stub could be combined local procedure

RPC Recipe: 10 step program 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 (skeleton) 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

Marshaling Needed to ensure send is contiguous Encoded remote procedure and flatten arguments; must know sizes Decode on the server side Issues?

Transparency RPCs are transparent to the caller Is this really true. In what ways are transparency violated?

RPC Interface Who generates the stubs? Integrated in host programming language inherits semantics of PL, greater transparency, but client/server written in same PL Java RMI Compiler generated stubs: IDL IDL (signatures) compiled into native languages: client/server can be written in different PL Sun RPC

Failure Maybe-call: no guarantees; caller can t tell if remote procedure was executed was request or reply lost? At-least-once: client will continually try no duplicate filtering request may execute multiple times: issues? At-most-once: filter duplicates Idempotent server: the effect of executing a request N times is the same as 1 time

RPC Optimizations Asynchronous RPC no return value/1-way RPC -> don t wait at all, possible wait for server acceptance of request examples?

Solution 1. Two RPCs Asynchronous RPC Solution 2. Deferred blocking A = op_1 (.); // some code that doesn t need A; // now I need A, block somehow B = A + 1; Q: What is the price of this kind of optimization?

Chaining RPC Optimizations A = op_1 (B, op_2 (X)); // no need for op_2 to return its value to main program Light-weight RPC most RPCs are actually done to server on same machine!, e.g. Window Manager Most RPCs are very small (< 200 bytes) optimize this case: LRPC or upcalls Clumping combine RPCs from same client to same server

Object-based RPC Objects state, methods, and interface passive objects (C++ or Java objects), basically just data-structures+operations these objects have no thread of control Distributed/Active/Remote object has a thread of control and two parts interface proxy at the client side and the actual object at the server side

Object-based RPC Client binds to a distributed object proxy gets loaded into client address space statically or dynamically Compile-time vs. runtime objects compile-time: language-specific C++/Java runtime: any language, use a wrapper (object adapter)

Comparison Object-based vs. Procedural RPC object reference is a first-class entity can be passed stubs cannot! why do this? issues?

Next Time Next topic: Java RMI, Unix RPC Read COM papers on line