1 Remote Procedure Call Outline Protocol Stack Presentation Formatting.

Slides:



Advertisements
Similar presentations
CSE 486/586 Distributed Systems Remote Procedure Call
Advertisements

CSCI-1680 RPC and Data Representation Rodrigo Fonseca.
Remote Procedure Call (RPC)
Remote Procedure Call Design issues Implementation RPC programming
Spring 2002CS 4611 Remote Procedure Call Outline Protocol Stack Presentation Formatting.
Spring Remote Procedure Call (5.3) Outline Protocol Stack Presentation Formatting.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Computing Systems 15, 2015 Next up Client-server model RPC Mutual exclusion.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
CS6223: Distributed Systems Remote Procedure Call (RPC)
Distributed Systems Lecture #3: Remote Communication.
CS 582 / CMPE 481 Distributed Systems Communications (cont.)
CS533 - Concepts of Operating Systems 1 Remote Procedure Calls - Alan West.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
CS 582 / CMPE 481 Distributed Systems Communications (cont.)
CSE331: Introduction to Networks and Security Lecture 11 Fall 2002.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Outcomes What is RPC? The difference between conventional procedure call and RPC? Understand the function of client and server stubs How many steps could.
End-to-End Data Outline Presentation Formatting Data Compression.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Remote Procedure Call Steve Ko Computer Sciences and Engineering University at Buffalo.
CSCI-1680 RPC and Data Representation Rodrigo Fonseca.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
Presentation Services  need for a presentation services  ASN.1  declaring data type  encoding data types  implementation issues  reading: text, section.
CSE 486/586 CSE 486/586 Distributed Systems Remote Procedure Call Steve Ko Computer Sciences and Engineering University at Buffalo.
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.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
1Spring 2003, COM1337/3501 Lecture 5: End-to-End Protocols Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie, Morgan Kaufmann Chapter.
Chapter 4: Interprocess Communication‏ Pages
Chapter 5 : End-to-End (Transport) Protocols Summary of underlying best-effort network capabilities (host-host) –drops packets or datagrams –re-orders.
Politecnico di Milano © 2001 William Fornaciari Operating Systems R P C Remote Procedure Call Lecturer: William Fornaciari Politecnico di Milano
Spring 2006CS 3321 Remote Procedure Call Outline Protocol Stack Presentation Formatting.
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
Page 1 Remote Procedure Calls Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
CSE 331: Introduction to Networks and Security Fall 2000 Instructor: Carl A. Gunter Slide Set 5.
Introduction to Computer Networks
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Remote Procedure Calls CS587x Lecture Department of Computer Science Iowa State University.
Remote Procedure CallCS-502 Fall Remote Procedure Call (continued) CS-502, Operating Systems Fall 2007 (Slides include materials from Operating System.
Remote Procedure Call RPC
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 22 – April 1, 2010.
09/14/05 1 Implementing Remote Procedure Calls* Birrell, A. D. and Nelson, B. J. Presented by Emil Constantinescu *ACM Trans. Comput. Syst. 2, 1 (Feb.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
RPC Model, Stubs and Skeletons Divya Nampalli
1 Remote Procedure Calls External Data Representation (Ch 19) RPC Concept (Ch 20)
Spring 2000CS 4611 Remote Procedure Call Outline Protocol Stack Presentation Formatting.
1 Chapter 2. Communication. STEMPusan National University STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered.
1 COM Chapter 7 End-To-End Data 3 What Do We Do With The Data? From the network’s perspective, applications send messages to one another and these.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Topic 3: Remote Invocation Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Presentation Services
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Prof. Leonardo Mostarda University of Camerino
CSE 486/586 Distributed Systems Remote Procedure Call
Dave Eckhardt RPC Dave Eckhardt
CMSC621: Advanced Operating Systems Advanced Operating Systems
SACK TCP (RFC 2018).
DISTRIBUTED COMPUTING
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
7. End-to-end data Rocky K. C. Chang Department of Computing
Advanced Computer Networks
Remote Procedure Call (RPC) Neil Tang 11/26/2008
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
University of Houston Remote Procedure Call Datacom II Lecture 6
CSCI-1680 RPC and Data Representation
Remote invocation (call)
Last Class: Communication in Distributed Systems
Presentation transcript:

1 Remote Procedure Call Outline Protocol Stack Presentation Formatting

2 RPC Timeline

3 RCP Components Protocol Stack –BLAST: fragments and reassembles large messages –CHAN: synchronizes request and reply messages –SELECT: dispatches request to the correct process Stubs

4 Bulk Transfer (BLAST) Unlike AAL and IP, tries to recover from lost fragments Strategy –selective retransmission –aka partial acknowledgements

5 BLAST Details Sender: –after sending all fragments, set timer DONE –if receive SRR, send missing fragments and reset DONE –if timer DONE expires, free fragments

6 BLAST Details (cont) Receiver: –when first fragments arrives, set timer LAST_FRAG –when all fragments present, reassemble and pass up –four exceptional conditions: if last fragment arrives but message not complete –send SRR and set timer RETRY if timer LAST_FRAG expires –send SRR and set timer RETRY if timer RETRY expires for first or second time –send SRR and set timer RETRY if timer RETRY expires a third time –give up and free partial message

7 BLAST Header Format MID must protect against wrap around TYPE = DATA or SRR NumFrags indicates number of fragments FragMask distinguishes among fragments –if Type=DATA, identifies this fragment –if Type=SRR, identifies missing fragments

8 Request/Reply (CHAN) Guarantees message delivery Synchronizes client with server Supports at-most-once semantics Simple case Implicit Acks

9 CHAN Details Lost message (request, reply, or ACK) –set RETRANSMIT timer –use message id (MID) field to distinguish Slow (long running) server –client periodically sends “are you alive” probe, or –server periodically sends “I’m alive” notice Want to support multiple outstanding calls –use channel id (CID) field to distinguish Machines crash and reboot –use boot id (BID) field to distinguish

10 CHAN Header Format typedef struct { u_short Type; /* REQ, REP, ACK, PROBE */ u_short CID; /* unique channel id */ int MID; /* unique message id */ int BID; /* unique boot id */ int Length; /* length of message */ int ProtNum; /* high-level protocol */ } ChanHdr; typedef struct { u_char type; /* CLIENT or SERVER */ u_char status; /* BUSY or IDLE */ int retries; /* number of retries */ int timeout; /* timeout value */ XkReturn ret_val; /* return value */ Msg *request; /* request message */ Msg *reply; /* reply message */ Semaphore reply_sem; /* client semaphore */ int mid; /* message id */ int bid; /* boot id */ } ChanState;

11 Synchronous vs Asynchronous Protocols Asynchronous interface send(Protocol llp, Msg *message) deliver(Protocol llp, Msg *message) Synchronous interface call(Protocol llp, Msg *request, Msg *reply) upcall(Protocol hlp, Msg *request, Msg *reply) CHAN is a hybrid protocol –synchronous from above: call –asynchronous from below: deliver

12 Dispatcher (SELECT) Dispatch to appropriate procedure Synchronous counterpart to UDP Implement concurrency (open multiple CHANs) Address Space for Procedures –flat: unique id for each possible procedure –hierarchical: program + procedure number Caller (client) SELECT CHAN call Callee (server) SELECT CHAN upcall deliversend deliversend

13 Simple RPC Stack

14 SunRPC IP implements BLAST-equivalent –except no selective retransmit SunRPC implements CHAN-equivalent –except not at-most-once UDP + SunRPC implement SELECT-equivalent –UDP dispatches to program (ports bound to programs) –SunRPC dispatches to procedure within program

15 SunRPC Header Format XID (transaction id) is similar to CHAN’s MID Server does not remember last XID it serviced Problem if client retransmits request while reply is in transit

16 Presentation Formatting Marshalling (encoding) application data into messages Unmarshalling (decoding) messages into application data Data types we consider –integers –floats –strings –arrays –structs Types of data we do not consider –images –video –multimedia documents Application data Presentation encoding Application data Presentation decoding Message ■ ■ ■■ ■ ■

17 Difficulties Representation of base types –floating point: IEEE 754 versus non-standard –integer: big-endian versus little-endian (e.g., 34,677,374) Compiler layout of structures

18 Taxonomy Data types –base types (e.g., ints, floats); must convert –flat types (e.g., structures, arrays); must pack –complex types (e.g., pointers); must linearize Conversion Strategy –canonical intermediate form –receiver-makes-right (an N x N solution)

19 Taxonomy (cont) Tagged versus untagged data Stubs –compiled –interpreted

20 eXternal Data Representation (XDR) Defined by Sun for use with SunRPC C type system (without function pointers) Canonical intermediate form Untagged (except array length) Compiled stubs

21 #define MAXNAME 256; #define MAXLIST 100; struct item { int count; char name[MAXNAME]; int list[MAXLIST]; }; bool_t xdr_item(XDR *xdrs, struct item *ptr) { return(xdr_int(xdrs, &ptr->count) && xdr_string(xdrs, &ptr->name, MAXNAME) && xdr_array(xdrs, &ptr->list, &ptr->count, MAXLIST, sizeof(int), xdr_int)); }

22 Abstract Syntax Notation One (ASN-1) An ISO standard Essentially the C type system Canonical intermediate form Tagged Compiled or interpretted stubs BER: Basic Encoding Rules (tag, length, value)

23 Network Data Representation (NDR) Defined by DCE Essentially the C type system Receiver-makes-right (architecture tag) Individual data items untagged Compiled stubs from IDL 4-byte architecture tag –IntegerRep 0 = big-endian 1 = little-endian –CharRep 0 = ASCII 1 = EBCDIC –FloatRep 0 = IEEE = VAX 2 = Cray 3 = IBM