Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?

Slides:



Advertisements
Similar presentations
1 Communication in Distributed Systems REKs adaptation of Tanenbaums Distributed Systems Chapter 2.
Advertisements

CSE 486/586 Distributed Systems Remote Procedure Call
Remote Procedure Call (RPC)
Remote Procedure Call Design issues Implementation RPC programming
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
Fast Communication Firefly RPC Lightweight RPC  CS 614  Tuesday March 13, 2001  Jeff Hoy.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
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.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
CS 582 / CMPE 481 Distributed Systems Communications (cont.)
Implementing Remote Procedure Calls Authors: Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presenter: Jim Santmyer Thanks to:
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
CSE331: Introduction to Networks and Security Lecture 11 Fall 2002.
Remote Procedure Call Chin-Chih Chang. Remote Procedure Call Remote Procedure Call (RPC) is a protocol that allows programs to call procedures located.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
Outcomes What is RPC? The difference between conventional procedure call and RPC? Understand the function of client and server stubs How many steps could.
CS 582 / CMPE 481 Distributed Systems Communications (cont.)
Univ. of TehranDistributed Operating Systems1 Advanced Operating Systems University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
EEC-681/781 Distributed Computing Systems Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
.NET Mobile Application Development Remote Procedure Call.
EECS122 - UCB 1 CS 194: Distributed Systems Communication Protocols, RPC Computer Science Division Department of Electrical Engineering and Computer Sciences.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W
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.
Communication Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
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.
Distributed (Operating) Systems -Communication in Distributed Systems- Fall 2011 Kocaeli University Computer Engineering Department.
Politecnico di Milano © 2001 William Fornaciari Operating Systems R P C Remote Procedure Call Lecturer: William Fornaciari Politecnico di Milano
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
Univ. of TehranDistributed Operating Systems1 Advanced Operating Systems University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
REQUEST/REPLY COMMUNICATION
Page 1 Remote Procedure Calls Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
1 Developing Application in Distributed Computing Environment (DCE)
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Remote Procedure CallCS-502 Fall Remote Procedure Call (continued) CS-502, Operating Systems Fall 2007 (Slides include materials from Operating System.
1 Conventional Procedure Call read(fd,buf,nbytes) a)Parameter passing in a local procedure call: the stack before the call to read b)The stack while the.
Remote Procedure Call RPC
- Manvitha Potluri. Client-Server Communication It can be performed in two ways 1. Client-server communication using TCP 2. Client-server communication.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
Reliable Client-Server Communication. Reliable Communication So far: Concentrated on process resilience (by means of process groups). What about reliable.
Remote Procedure Call (Introduction)
Fault Tolerance CSCI 4780/6780. RPC Semantics in Presence of Failures 5 types of exceptions Client cannot locate server Request to server is lost Server.
1 Chapter 2. Communication. STEMPusan National University STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Distributed Systems Lecture 8 RPC and marshalling 1.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
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.
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
CSE 486/586 Distributed Systems Remote Procedure Call
Remote Procedure Call present by :Enas Alkhoshi
CMSC621: Advanced Operating Systems Advanced Operating Systems
DISTRIBUTED COMPUTING
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Distributed Computing
CSE 451: Operating Systems Autumn 2009 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Remote invocation (call)
CSE 451: Operating Systems Autumn 2010 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Last Class: Communication in Distributed Systems
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Presentation transcript:

Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking? Buffered or unbuffered? Reliable or unreliable? Server architecture Scalability Push or pull? Group communication

Computer Science Lecture 3, page 2 CS677: Distributed OS Today: Remote Procedure Calls Goal: Make distributed computing look like centralized computing Allow remote services to be called as procedures –Transparency with regard to location, implementation, language Issues –How to pass parameters –Bindings –Semantics in face of errors Two classes: integrated into prog, language and separate

Computer Science Lecture 3, page 3 CS677: Distributed OS Conventional Procedure Call a)Parameter passing in a local procedure call: the stack before the call to read b) The stack while the called procedure is active

Computer Science Lecture 3, page 4 CS677: Distributed OS Parameter Passing Local procedure parameter passing –Call-by-value –Call-by-reference: arrays, complex data structures Remote procedure calls simulate this through: –Stubs – proxies –Flattening – marshalling Related issue: global variables are not allowed in RPCs

Computer Science Lecture 3, page 5 CS677: Distributed OS Client and Server Stubs Principle of RPC between a client and server program.

Computer Science Lecture 3, page 6 CS677: Distributed OS Stubs Client makes procedure call (just like a local procedure call) to the client stub Server is written as a standard procedure Stubs take care of packaging arguments and sending messages Packaging is called marshalling Stub compiler generates stub automatically from specs in an Interface Definition Language (IDL) –Simplifies programmer task

Computer Science Lecture 3, page 7 CS677: Distributed OS 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

Computer Science Lecture 3, page 8 CS677: Distributed OS Example of an RPC 2-8

Computer Science Lecture 3, page 9 CS677: Distributed OS Marshalling Problem: different machines have different data formats –Intel: little endian, SPARC: big endian Solution: use a standard representation –Example: external data representation (XDR) Problem: how do we pass pointers? –If it points to a well-defined data structure, pass a copy and the server stub passes a pointer to the local copy What about data structures containing pointers? –Prohibit –Chase pointers over network Marshalling: transform parameters/results into a byte stream

Computer Science Lecture 3, page 10 CS677: Distributed OS Binding Problem: how does a client locate a server? –Use Bindings Server –Export server interface during initialization –Send name, version no, unique identifier, handle (address) to binder Client –First RPC: send message to binder to import server interface –Binder: check to see if server has exported interface Return handle and unique identifier to client

Computer Science Lecture 3, page 11 CS677: Distributed OS Binding: Comments Exporting and importing incurs overheads Binder can be a bottleneck –Use multiple binders Binder can do load balancing

Computer Science Lecture 3, page 12 CS677: Distributed OS Failure Semantics Client unable to locate server: return error Lost request messages: simple timeout mechanisms Lost replies: timeout mechanisms –Make operation idempotent –Use sequence numbers, mark retransmissions Server failures: did failure occur before or after operation? –At least once semantics (SUNRPC) –At most once –No guarantee –Exactly once: desirable but difficult to achieve

Computer Science Lecture 3, page 13 CS677: Distributed OS Failure Semantics Client failure: what happens to the server computation? –Referred to as an orphan –Extermination: log at client stub and explicitly kill orphans Overhead of maintaining disk logs –Reincarnation: Divide time into epochs between failures and delete computations from old epochs –Gentle reincarnation: upon a new epoch broadcast, try to locate owner first (delete only if no owner) –Expiration: give each RPC a fixed quantum T; explicitly request extensions Periodic checks with client during long computations

Computer Science Lecture 3, page 14 CS677: Distributed OS Implementation Issues Choice of protocol [affects communication costs] –Use existing protocol (UDP) or design from scratch –Packet size restrictions –Reliability in case of multiple packet messages –Flow control Copying costs are dominant overheads –Need at least 2 copies per message From client to NIC and from server NIC to server –As many as 7 copies Stack in stub – message buffer in stub – kernel – NIC – medium – NIC – kernel – stub – server –Scatter-gather operations can reduce overheads

Computer Science Lecture 3, page 15 CS677: Distributed OS Case Study: SUNRPC One of the most widely used RPC systems Developed for use with NFS Built on top of UDP or TCP –TCP: stream is divided into records –UDP: max packet size < 8912 bytes –UDP: timeout plus limited number of retransmissions –TCP: return error if connection is terminated by server Multiple arguments marshaled into a single structure At-least-once semantics if reply received, at-least-zero semantics if no reply. With UDP tries at-most-once Use SUN’s eXternal Data Representation (XDR) –Big endian order for 32 bit integers, handle arbitrarily large data structures

Computer Science Lecture 3, page 16 CS677: Distributed OS Binder: Port Mapper Server start-up: create port Server stub calls svc_register to register prog. #, version # with local port mapper Port mapper stores prog #, version #, and port Client start-up: call clnt_create to locate server port Upon return, client can call procedures at the server

Computer Science Lecture 3, page 17 CS677: Distributed OS Rpcgen: generating stubs Q_xdr.c: do XDR conversion Detailed example: later in this course

Computer Science Lecture 3, page 18 CS677: Distributed OS Summary RPCs make distributed computations look like local computations Issues: –Parameter passing –Binding –Failure handling Case Study: SUN RPC