Dave Eckhardt de0u@andrew.cmu.edu RPC Dave Eckhardt de0u@andrew.cmu.edu.

Slides:



Advertisements
Similar presentations
RPC Robert Grimm New York University Remote Procedure Calls.
Advertisements

Remote Procedure Call (RPC)
Remote Procedure Call Design issues Implementation RPC programming
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
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.
Distributed Systems Lecture #3: Remote Communication.
Communication in Distributed Systems –Part 2
Distributed Systems Lecture # 3. Administrivia Projects –Design and Implement a distributed file system Paper Discussions –Discuss papers as case studies.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
Chapter 4: Interprocess Communication‏ Pages
Client Call Back Client Call Back is useful for multiple clients to keep up to date about changes on the server Example: One auction server and several.
IT 344: Operating Systems Winter 2008 Module 19 Networking & Remote Procedure Call (RPC) Chia-Chi Teng CTB 265.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
IPC & RPC Dave Eckhardt Outline ● IPC – InterProcess Communication ● RPC – Remote Procedure Call ● Textbook – Sections 4.5, 4.6.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Remote Procedure Call Andy Wang Operating Systems COP 4610 / CGS 5765.
Remote Method Invocation by James Hunt, Joel Dominic, and Adam Mcculloch.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Manish Kumar,MSRITSoftware Architecture1 Remote procedure call Client/server architecture.
Distributed objects and remote invocation Pages
RPC Model, Stubs and Skeletons Divya Nampalli
1 RMI Russell Johnston Communications II. 2 What is RMI? Remote Method Invocation.
© 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.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Distributed Web Systems Distributed Objects and Remote Method Invocation Lecturer Department University.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
Operating Systems {week 11a}
Java Distributed Computing
“...Mooooo!...” IPC & RPC Nov. 15, 2004 Dave Eckhardt
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Prof. Leonardo Mostarda University of Camerino
Java Distributed Computing
CSE 486/586 Distributed Systems Remote Procedure Call
MCA – 405 Elective –I (A) Java Programming & Technology
Remote Method Invocation
Programming Models for Distributed Application
Distributed Systems CS
CMSC621: Advanced Operating Systems Advanced Operating Systems
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
DISTRIBUTED COMPUTING
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Sarah Diesburg Operating Systems COP 4610
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
CSE 451: Operating Systems Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Distributed Program Design
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Spring 2012 Module 22 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Autumn 2009 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
EECE.4810/EECE.5730 Operating Systems
Distribution Infrastructures
Remote Procedure Call Hank Levy 1.
Lecture 6: RPC (exercises/questions)
Distributed Systems CS
Remote invocation (call)
Remote Procedure Call Hank Levy 1.
CSE 451: Operating Systems Autumn 2010 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Lecture 6: RPC (exercises/questions)
Lecture 7: RPC (exercises/questions)
CSE 451: Operating Systems Winter 2003 Lecture 16 RPC
Remote Procedure Call Hank Levy 1.
Last Class: Communication in Distributed Systems
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Java Chapter 5 (Estifanos Tilahun Mihret--Tech with Estif)
Distributed Systems CS
Presentation transcript:

Dave Eckhardt de0u@andrew.cmu.edu RPC Dave Eckhardt de0u@andrew.cmu.edu

Synchronization No Lecture Friday Book report assignment Today: RPC On Homework page, due mid-April Book approval hotline: de0u+books@andrew Paper collections fine Send: titles, URLs, page counts Avoid: “Some Exokernel papers” Today: RPC Text: 4.6 (far from exhaustive)

Overview RPC = Remote Procedure Call Extends IPC in two ways IPC = Inter-Process Communication OS-level: bytes, not objects IPC restricted to single machine Marshalling Server location Call semantics

RPC Model Approach Issues Abstract away from “who computes it” d = computeNthDigit(CONST_PI, 3000); Abstract away from “who computes it” Should “work the same” when remote Cray does Issues Must specify server somehow What “digit value” is “server down”? Exceptions useful in “modern” languages

Marshalling Values must cross the network Machine formats differ Integer byte order www.scieng.com/ByteOrder.PDF Floating point format IEEE 754 or not Memory packing/alignment issues

Marshalling Define a “network format” ASN.1 - “self-describing” via in-line tags XDR – not “Serialize” language-level object to byte stream Rules typically recursive Serialize a struct by serializing its fields in order Implementation probably should not be

Marshalling Issues Some types don't translate well Performance! Ada has ranged integers, e.g., 44..59 Not everybody really likes 64-bit ints Floating point formats are religious issues Performance! Memory speed ≅ network speed The dreaded “pointer problem”

Marshalling Implications? struct node { int value; struct node *neighbors[4]; } n = occupancy(nodes, nnodes); bn = best_neighbor(node); i = value(node); Implications?

Marshalling Marshall array – ok Marshall graph structure – not so ok n = occupancy(nodes, nnodes); Marshall array – ok bn = best_neighbor(node); Marshall graph structure – not so ok i = value(node); Avoiding marshalling graph – not obvious

Server location Which machine? Approaches Multiple AFS cells on the planet Each has multiple file servers Approaches Special hostnames: www.cmu.edu Machine lists AFS CellSrvDB /usr/vice/etc/CellServDB DNS SRV records (RFC 2782)

Server location Which port? Must distinguish services on one machine Fixed port assignment AFS: fileserver UDP 7000, volume location 7003 /etc/services or www.iana.org/assignments/port-numbers RFC 2468 www.rfc-editor.org/rfc/rfc2468.txt Dynamic port assignment Contact “courier” / “matchmaker” service via RPC ...on a fixed port assignment!

Call semantics Typically, caller blocks Blocking can be expensive Matches procedure call semantics Blocking can be expensive By a factor of a million! Asynchronous RPC Transmit request, do other work, check for reply Like programming language “futures”

Call Semantics Batch RPC Issues Send list of procedure calls Later calls can use results of earlier calls Issues Abort batch if one call fails? Yet another programming language? Typically wrecks “procedure call” abstraction Must make N calls before 1st answer

Call Semantics Batch RPC Examples NFS v4 (maybe), RFC 3010 Bloch, A Practical Approach to Replication of Abstract Data Objects

Call semantics Network failure Server reboot Retransmit How long? Server reboot Does client deal with RPC session restart? Did the call “happen” or not?

Client Flow Client code calls stub routine Stub routine “Regular code” which encapsulates the magic Stub routine Locates communication channel Else: costly location/set-up/authentication Marshals information Including procedure # Sends message, awaits reply Unmarshals reply, returns

Server Flow Thread/process pool runnning skeleton code Skeleton code Waits for request Locates client state Authentication/encryption context Unmarshals parameters Calls “real code” Marshals reply Sends reply

Deployment Define interface Run stub generator Get it right, you'll live with it for a while Run stub generator Link stubs with client & server Run a server!

Java RMI Remote Method Invocation Serialization: programmer/language cooperation Dangerously subtle! Bloch, Effective Java RMI > RPC Remote methods ≅ remote procedures Parameters can be (differently) remote Client on A can call method on B passing object on C (slowly)

Summary RPC is lots of fun So much fun that lots of things don't do it SMTP HTTP Read Effective Java No class Friday