Inter-process Communication: RPC
|
|
- Loraine Hamilton
- 6 years ago
- Views:
Transcription
1 Inter-process Communication: RPC Dr. Yong Guan Department of Electrical and Computer Engineering & Information Assurance Center Iowa State University
2 Outline for Today s Talk Inter-process Communication: RPC Remote Procedure Call
3 Readings for Today s Lecture Chapter 4 of Distributed Systems: Principles and Paradigms Online resources and man page
4 Middleware Purpose of Middleware in Distributed Systems RPC(Remote Procedure Call) Introduction RPC mechanisms Design issues Programming with RPC Case study: SUN RPC (Live demo) Java RMI CORBA
5 Purpose of Middleware in Distributed Systems Principles of transparency Hide Lower level complexities Ease the Application Development Allows to focus on Application functionality Application Middleware Server Server Server Server Distributed System
6 Building Distributed Programs: Two Paradigms Paradigms: Communication-Oriented Design Application-Oriented Design Start with communication protocol Start with application Design message format and syntax Design client and server components by specifying how they react to incoming messages Design, build, test conventional implementation Partition program Properties: Focus on communication instead of application! Focus on application program structure Design protocol first, then build applications that adhere to the protocol Example: socket Make communication transparent Example: RPC
7 Introduction-RPC 1984: Birrell & Nelson Mechanisms to call procedures on other machines Processes on machine A can call procedures on machine B A is suspended Execution continues on B When B returns, control passed back to A Goal: it appears to the programmer that a normal call is taking place 7
8 Conventional Procedure Call count = read (fd, buf, bytes) call-by-value call-by-reference a) Parameter passing in a local procedure call: the stack before the call to read b) The stack while the called procedure is active
9 Remote Procedure Call Allow programs to call procedures located on other machines Information can be transported from the caller to the callee in the parameters and come back in the procedure result. RPC enables clients to communicate with servers by calling procedures in a similar way to the conventional use of procedure calls in high-level languages. Transparency: no message passing is visible to the programmer. Challenges: Different machines Different address spaces Both machines can crash
10 RPC Model: Client (caller) and Server (callee) Principle of RPC between a client and server program CprE main program on machine 1 procedure A on machine 2 procedure B on machine 3 call remote proc A call remote proc B exit respond to caller respond to caller
11 Asynchronous RPC 2-12 a) The interconnection between client and server in a traditional RPC b) The interaction using asynchronous RPC
12 Structure of an RPC Call client RPC server packing parameters client stub packing / unpacking result server stub unpacking parameters RPC library(network routines) RPC library(network Routines) 8 3 Packaging/unpackaging of arguments into network messages is called marshaling/unmarshaling.
13 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
14 RPC Stubs A client-side stub is a function that looks to the client as if it were a callable server function i.e., same API as the server s implementation of the function A server-side stub looks like a caller to the server i.e., like a hunk of code invoking the server function The client program thinks it s invoking the server but it s calling into the client-side stub The server program thinks it s called by the client but it s really called by the server-side stub The stubs send messages to each other to make the RPC happen transparently (almost!) Remote Procedure Call CS-4513, D-Term
15 Marshalling Arguments Marshalling is the packing of function parameters into a message packet the RPC stubs call type-specific functions to marshal or unmarshal the parameters of an RPC Client stub marshals the arguments into a message Server stub unmarshals the arguments and uses them to invoke the service function on return: the server stub marshals return values the client stub unmarshals return values, and returns to the client program Remote Procedure Call CS-4513, D-Term
16 RPC Model A server defines the service interface using an interface definition language (IDL) the IDL specifies the names, parameters, and types for all client-callable server procedures A stub compiler reads the IDL declarations and produces two stub functions for each server function Server-side and client-side Linking: Server programmer implements the service s functions and links with the server-side stubs Client programmer implements the client program and links it with client-side stubs Operation: Stubs manage all of the details of remote communication between client and server Remote Procedure Call CS-4513, D-Term
17 RPCs: Issues of Design What are semantics of parameter passing? E.g., pass by reference? Binding - How to bind (locate & connect) to servers? Exception Handling Performance and security Data Representation - How to handle heterogeneity? OS, language, architecture,
18 Parameter Passing Passing value parameters Parameter marshalling Passing reference parameters How to pass pointers (i.e., references), that are not meaningful on the server Possible solution: Case: pointer to an array If the size of the array is known, we can copy the array into a message and send it to the server. In this case, call-by-reference is replaced by copy/restore. We still cannot handle the most general case of a pointer to an arbitrary data structures (complex graph).
19 Passing Value Parameters 2-8 Steps involved in doing remote computation through RPC
20 RPC Binding Binding is the process of connecting the client to the server the server, when it starts up, exports its interface identifies itself to a network name server tells RPC runtime that it is alive and ready to accept calls the client, before issuing any calls, imports the server RPC runtime uses the name server to find the location of the server and establish a connection The import and export operations are explicit in the server and client programs Remote Procedure Call CS-4513, D-Term
21 Locating Servers Broadcast requests Broadcast call and process incoming replies Name servers Server registers with name server name server client stub Occurs only once register stub server Publish & Subscribe Flexible client stub subscribe name server publish stub server May occur more than once
22 Result (RPC Advantages) Writing applications is simplified RPC hides all networks codes Programmers don t have to worry about details (sockets, port numbers, byte ordering) The hard work of building messages, formatting, uniform representation, etc., is buried in the stubs Client and server designers can concentrate on the semantics of application Programs behave in familiar way Familiar Procedure call interface Remote Procedure Call CS-4513, D-Term
23 Case Study: SUN RPC rpcgen compiler Takes IDL as input and generate stub functions. Format of messages, arguments, and results. XDR (external Data Representation). RPC run-time library How to locate server and server application port. remote program proc A proc B proc C shared data
24 Interface definition language (IDL) Defines service interface between client and server A language for specifying operations (procedures or functions) parameters to these operations, other optional data types /* * date.x - Specification of remote date, time, date and time service. */ program DATE_PROG { version DATE_VERS { string DATE(long) = 1; /* procedure number = 1 */ } = 1; /* version number = 1 */ } = 0x
25 Identifying Remote Programs and Procedures CprE Conceptually, each procedure on a computer is identified by pair : ( prog, proc ) prog: 32-bit integer identifying remote program proc: integer identifying procedure Set of program numbers partitioned into 4 sets. 0x x1fffffff 0x x3fffffff 0x x5fffffff 0x xffffffff assigned by SUN assigned by local system manager temporary reserved Multiple remote program versions can be identified: ( prog, version, proc )
26 RPC Interaction CprE Client contacts portmapper to determine service port. 3. Client contacts server on the specified service port.
27 Remote Programs and Protocol Ports CprE caller port remote program program_id vs. port_id (32 bit) (16 bit) Dynamic port mapping: RPC port mapper You must know the server address first. RPC program xx RPC program registers (xx, p) port mapper p 111 port currently used by this RPC program well-known port for port manager
28 Comparison: Binding service in DCE RPC 2-15 DCE: A directory server help to locate RPC server. SUN: You should specify the RPC server.
29 XDR - external Data Representation XDR is a universally used standard from Sun Microsystems used to represent data in a network canonical form. A set of conversion functions are used to encode and decode data; for example, xdr_int( ) is used to encode and decode integers. Data is converted into a network canonical form (a standard form) to be presented in a meaningful format to the receiving host. Conversion functions exist for all standard data types. However, for complex structures, RPCGEN is used to generate conversion routines.
30 Sun RPC Message Format: XDR Specification enum msg_type { /* RPC message type constants */ CALL = 0; REPLY = 1; }; struct rpc_msg { /* format of a RPC message */ unsigned int mesgid; /* used to match reply to call */ union switch (msg_type mesgt) { case CALL : call_body cbody; case REPLY: reply_body rbody; } body; }; struct call_body { /* format of RPC CALL */ u_int rpcvers; /* which version of RPC? */ u_int rprog; /* remote program number */ u_int rprogvers; /* version number of remote prog */ u_int rproc; /* number of remote procedure */ opaque_auth cred; /* credentials for called auth. */ opaque_auth verf; /* authentication verifier */ /* ARGS */ };
31 Creating Distributed Applications with Sun RPC Example: Remote Dictionary Using rpcgen Procedure call structure: rdict1.c main rdict2.c nextin init_dic lookupw insertw deletew
32 Specification for rpcgen Interface: *.x file Specify: constants data types remote programs, their procedures, types of parameters /* rdict.x */ /* RPC declarations for dictionary program */ const MAXWORD = 50; const DICTSIZ = 100; struct example { /* unused; rpcgen would */ int exfield1; /* generate XDR routines */ char exfield2; /* to convert this structure.*/ }; /* RDICTPROG: remote program that provides insert, delete, and lookup */ program RDICTPROG { /* name (not used) */ version RDICTVERS { /* version declarat.*/ int INITW(void) = 1;/* first procedure */ int INSERTW(string)= 2;/* second proc... */ int DELETEW(string)= 3; int LOOKUP(string) = 4; } = 1; /* version definit.*/ } = 0x ; /* program no */ /* (must be unique)*/
33 Program Generation rdict.h constants, data types definitions for remote procedures rdict_xdr.c XDR conversion routines rpcgen rdict.x rdict_clnt.c client stub rdict_svc.c server stub rdict_cif.c rdict1.c rdict_clnt.c cc rdict (client) rdict.x rpcgen rdict.h rdict_xdr.c rdict_svc.c cc rdictd rdict_sif.c rdict2.c
34 Example: Date.x /* * date.x - Specification of remote date, time, date and time service. */ /* * Define 1 procedure : * date_1() accepts a long and returns a string. */ program DATE_PROG { version DATE_VERS { string DATE(long) = 1; /* procedure number = 1 */ } = 1; /* version number = 1 */ } = 0x ; /* program number */
35 #include <stdio.h> #include <string.h> #include <time.h> #include <sys/types.h> #include <rpc/rpc.h> /* standard RPC include file */ #include "date.h" /* this file is generated by rpcgen */ Client.c #define MAX_LEN 100 long get_response(void); long get_response() { long choice; } printf("===========================================\n"); printf(" Menu: \n"); printf(" \n"); printf(" 1. Date\n"); printf(" 2. Time\n"); printf(" 3. Both\n"); printf(" 4. Quit\n"); printf(" \n"); printf(" Choice (1-4):"); scanf("%ld",&choice); printf("===========================================\n"); return(choice);
36 main(int argc, char **argv) { CLIENT *cl; /* RPC handle */ char *server; char **sresult; /* return value from date_1() */ char s[max_len]; /* character array to hold output */ long response; /* user response */ long *lresult; /* pointer to user response */ CprE Pointer of data type defined in x file } if (argc!= 2) { fprintf(stderr, "usage: %s hostname\n", argv[0]); exit(1); } server = argv[1]; lresult = (&response); /* * Create the client "handle." */ Specify server address if ( (cl = clnt_create(server, DATE_PROG, DATE_VERS, "udp")) == NULL) { clnt_pcreateerror(server); exit(2); } response = get_response(); while(response!= 4) { if ((sresult = date_1(lresult, cl)) == NULL) { clnt_perror(cl, server); exit(3); } printf(" %s\n", *sresult); response = get_response(); } clnt_destroy(cl); /* done with the handle */ exit(0); Client.c (cont.) Create client handle Call ProcName_VerName with client handle
37 /* * date_proc.c - remote procedures; called by server stub. */ #include <rpc/rpc.h> /* standard RPC include file */ #include <time.h> #include <sys/types.h> #include "date.h" /* this file is generated by rpcgen */ CprE #define MAX_LEN 100 /* * Return the binary date and time. */ char ** date_1(long *option) { struct tm *timeptr; /* Pointer to time structure */ time_t clock; /* Clock value (in secs) */ static char *ptr; /* Return string */ static char err[] = "Invalid Response \0"; static char s[max_len]; Server.c clock = time(0); timeptr = localtime(&clock); Pointers of data type defined in x file switch(*option) { case 1: strftime(s,max_len,"%a, %B %d, %Y",timeptr); ptr=s; break; case 2: strftime(s,max_len,"%t",timeptr); ptr=s; break; case 3: strftime(s,max_len,"%a, %B %d, %Y - %T",timeptr); ptr=s; break; } default: ptr=err; break; } return(&ptr);
38 Program Generation Client Program Client stub cc Client Executable IDL rpcgen compiler Headers xdr routine Server stub cc Server Executable Server Program
39 Steps to Compile and Run ssh to linux-4.ece.iastate.edu with your NetID and password Save date.x, client.c and server.c into some directory. Under the directory, execute: rpcgen k date.x (-k generates code in K&R C. Needed in this machine!) gcc o client client.c date_clnt.c gcc o server server.c date_svc.c./server &./client localhost kill server_pid (run server at back end) (run client with the server on localhost) (kill the server)
40 Project - 1 Remote System Monitoring using RPC Current System time CPU Usage Memory Usage Load Procs per minute
41 Thank you! CprE
Remote Procedure Calls (RPC)
Distributed Computing Remote Procedure Calls (RPC) Dr. Yingwu Zhu Problems with Sockets Sockets interface is straightforward [connect] read/write [disconnect] BUT it forces read/write mechanism We usually
More informationSun Remote Procedure Call Mechanism
Sun Remote Procedure Call Mechanism Originally developed by Sun, but now widely available on other platforms (including Digital Unix). Also known as Open Network Computing (ONC). Sun RPC package has an
More informationDistributed Systems 8. Remote Procedure Calls
Distributed Systems 8. Remote Procedure Calls Paul Krzyzanowski pxk@cs.rutgers.edu 10/1/2012 1 Problems with the sockets API The sockets interface forces a read/write mechanism Programming is often easier
More informationDistributed Systems. How do regular procedure calls work in programming languages? Problems with sockets RPC. Regular procedure calls
Problems with sockets Distributed Systems Sockets interface is straightforward [connect] read/write [disconnect] Remote Procedure Calls BUT it forces read/write mechanism We usually use a procedure call
More informationLecture 12 RPC RPC RPC. Writing an RPC Program. Sun RPC RPC. February 9+11, 2005
RPC Lecture 12 RPC February 9+11, 2005 Remote Procedure Call Follows application-oriented approach (emphasizes problem over communication) Design program and then divide it. RPC RPC There exists a way
More informationCHAPTER - 4 REMOTE COMMUNICATION
CHAPTER - 4 REMOTE COMMUNICATION Topics Introduction to Remote Communication Remote Procedural Call Basics RPC Implementation RPC Communication Other RPC Issues Case Study: Sun RPC Remote invocation Basics
More informationRemote Procedure Call
Remote Procedure Call Outline Concept of RPC SunRPC Spring 2009 CSE30264 1 RPC Timeline Server Request Blocked Blocked Reply Computing Blocked Spring 2009 CSE30264 2 RPC There exists a way for processes
More informationOperating Systems. 18. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Spring /20/ Paul Krzyzanowski
Operating Systems 18. Remote Procedure Calls Paul Krzyzanowski Rutgers University Spring 2015 4/20/2015 2014-2015 Paul Krzyzanowski 1 Remote Procedure Calls 2 Problems with the sockets API The sockets
More informationRemote Procedure Call Part 2
Remote Procedure Call Part 2 York University COSC4213 The XDR File In our example, the only declared type is a structure with one integer filed and one character filed. rdict_xdr.c contains the code needed
More information416 Distributed Systems. RPC Day 2 Jan 12, 2018
416 Distributed Systems RPC Day 2 Jan 12, 2018 1 Last class Finish networks review Fate sharing End-to-end principle UDP versus TCP; blocking sockets IP thin waist, smart end-hosts, dumb (stateless) network
More informationProcess Concept: views of a process Process Scheduling CSCI 6730/ 4730 Operating Systems
Chapter 3: Processes: Outline Process Concept: views of a process Process Scheduling CSCI 6730/ 4730 Operating Systems Operations on Processes Cooperating Processes Inter Process Communication (IPC) RPC:
More informationChapter 3: Processes: Outline. Operating Systems. Remote Procedure Calls (RPC) Client-Server Remote Machine Communication Mechanisms
Chapter 3: Processes: Outline Operating Systems RPC: Processes Process Concept: views of a process Process Scheduling Operations on Processes Cooperating Processes Inter Process Communication (IPC) Local
More informationDistributed Objects and Remote Invocation. Programming Models for Distributed Applications
Distributed Objects and Remote Invocation Programming Models for Distributed Applications Extending Conventional Techniques The remote procedure call model is an extension of the conventional procedure
More informationDesarrollo de Aplicaciones en Red. El modelo de comunicación. General concepts. Models of communication. Message Passing
Desarrollo de Aplicaciones en Red El modelo de comunicación José Rafael Rojano Cáceres http://www.uv.mx/rrojano 1 2 General concepts As we saw in a Distributed System the logical and physical component
More informationRemote Invocation. Today. Next time. l Overlay networks and P2P. l Request-reply, RPC, RMI
Remote Invocation Today l Request-reply, RPC, RMI Next time l Overlay networks and P2P Types of communication " Persistent or transient Persistent A submitted message is stored until delivered Transient
More informationLecture 15: Network File Systems
Lab 3 due 12/1 Lecture 15: Network File Systems CSE 120: Principles of Operating Systems Alex C. Snoeren Network File System Simple idea: access disks attached to other computers Share the disk with many
More information416 Distributed Systems. RPC Day 2 Jan 11, 2017
416 Distributed Systems RPC Day 2 Jan 11, 2017 1 Last class Finish networks review Fate sharing End-to-end principle UDP versus TCP; blocking sockets IP thin waist, smart end-hosts, dumb (stateless) network
More informationCommunication. Communication. Distributed Systems. Networks and protocols Sockets Remote Invocation Messages Streams. Fall /10/2001 DoCS
Communication Distributed Systems Fall 2002 Communication Process Process Networks and protocols Sockets Remote Invocation Messages Streams 9/10/2001 DoCS 2002 2 Layered Protocols (1) Layers, interfaces,
More informationRPC. Remote Procedure Calls. Robert Grimm New York University
RPC Remote Procedure Calls Robert Grimm New York University Assignments! You need (more) time for interoperability testing!! Your server should be running by midnight Sunday! Assignment 3 test case posted!
More information6 Remote Procedure Call (RPC)
6 Remote Procedure Call (RPC) RFC 1831 (Sun) invoke procedure on remote host in analogy to local procedure call programming interface: (local) procedure call remote procedure call active client calls server
More informationRPC Paradigm. Lenuta Alboaie Andrei Panu
RPC Paradigm Lenuta Alboaie (adria@info.uaic.ro) Andrei Panu (andrei.panu@info.uaic.ro) 1 Content Remote Procedure Call (RPC) Preliminaries Characteristics XDR (External Data Representation) Functioning
More informationDistributed Systems Theory 4. Remote Procedure Call. October 17, 2008
Distributed Systems Theory 4. Remote Procedure Call October 17, 2008 Client-server model vs. RPC Client-server: building everything around I/O all communication built in send/receive distributed computing
More informationCommunication. Distributed Systems Santa Clara University 2016
Communication Distributed Systems Santa Clara University 2016 Protocol Stack Each layer has its own protocol Can make changes at one layer without changing layers above or below Use well defined interfaces
More informationLast Class: RPCs. Today:
Last Class: RPCs RPCs make distributed computations look like local computations Issues: Parameter passing Binding Failure handling Lecture 4, page 1 Today: Case Study: Sun RPC Lightweight RPCs Remote
More informationRemote Procedure Calls
CS 5450 Remote Procedure Calls Vitaly Shmatikov Abstractions Abstractions for communication TCP masks some of the pain of communicating over unreliable IP Abstractions for computation Goal: programming
More informationToday CSCI Communication. Communication in Distributed Systems. Communication in Distributed Systems. Remote Procedure Calls (RPC)
Today CSCI 5105 Communication in Distributed Systems Overview Types Remote Procedure Calls (RPC) Instructor: Abhishek Chandra 2 Communication How do program modules/processes communicate on a single machine?
More informationCOMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC)
COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC) 1 2 CONVENTIONAL PROCEDURE CALL (a) (b) Parameter passing in a local procedure call: the stack before the call to read. The stack while the called procedure
More informationRemote Procedure Calls CS 707
Remote Procedure Calls CS 707 Motivation Send and Recv calls I/O Goal: make distributed nature of system transparent to the programmer RPC provides procedural interface to distributed services CS 707 2
More informationRPC Programming. Some knowledge of C & Unix A network with at least two connected machines.
RPC Programming 1.0 Prerequisites Some knowledge of C & Unix A network with at least two connected machines. 2.0 Objectives: 1. To understand the basic principles of RPC 2. To develop a program which returns
More informationDISTRIBUTED COMPUTER SYSTEMS
DISTRIBUTED COMPUTER SYSTEMS Communication Fundamental REMOTE PROCEDURE CALL Dr. Jack Lange Computer Science Department University of Pittsburgh Fall 2015 Outline Communication Architecture Fundamentals
More informationREMOTE PROCEDURE CALLS EE324
REMOTE PROCEDURE CALLS EE324 Administrivia Course feedback Midterm plan Reading material/textbook/slides are updated. Computer Systems: A Programmer's Perspective, by Bryant and O'Hallaron Some reading
More informationRemote Procedure Call Implementations
Remote Procedure Call Implementations Sun ONC(Open Network Computing) RPC. Implements at-most-once semantics by default. At-least-once (idempotent) can also be chosen as an option for some procedures.
More informationRemote Procedure Call (RPC) and Transparency
Remote Procedure Call (RPC) and Transparency Brad Karp UCL Computer Science CS GZ03 / M030 10 th October 2014 Transparency in Distributed Systems Programmers accustomed to writing code for a single box
More informationOutline. EEC-681/781 Distributed Computing Systems. The OSI Network Architecture. Inter-Process Communications (IPC) Lecture 4
EEC-681/781 Distributed Computing Systems Lecture 4 Department of Electrical and Computer Engineering Cleveland State University wenbing@ieee.org Outline Inter-process communications Computer networks
More informationCSci Introduction to Distributed Systems. Communication: RPC
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
More informationRemote Procedure Call
Remote Procedure Call Remote Procedure Call Integrate network communication with programming language Procedure call is well understood implementation use Control transfer Data transfer Goals Easy make
More informationOverview. Communication types and role of Middleware Remote Procedure Call (RPC) Message Oriented Communication Multicasting 2/36
Communication address calls class client communication declarations implementations interface java language littleendian machine message method multicast network object operations parameters passing procedure
More informationRemote Invocation. Today. Next time. l Indirect communication. l Request-reply, RPC, RMI
Remote Invocation Today l Request-reply, RPC, RMI Next time l Indirect communication Data representation and marshalling Processes information kept as data structures but sent in msgs as sequence of bytes
More informationSystem Models and Communication
System Models and Communication http://idc.hust.edu.cn/~rxli/ Outline Terminology Client-Server Model OSI Model vs. Middleware Model Summary Ruixuan Li School of Computer Science and Technology Huazhong
More informationDistributed Systems Lecture 2 1. External Data Representation and Marshalling (Sec. 4.3) Request reply protocol (failure modes) (Sec. 4.
Distributed Systems Lecture 2 1 Today s Topics External Data Representation and Marshalling (Sec. 4.3) Request reply protocol (failure modes) (Sec. 4.4) Distributed Objects and Remote Invocations (5.1)
More informationChapter 4 Communication
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN Chapter 4 Communication Layered Protocols (1) Figure 4-1. Layers, interfaces, and protocols in the OSI
More informationC 1. Recap: Finger Table. CSE 486/586 Distributed Systems Remote Procedure Call. Chord: Node Joins and Leaves. Recall? Socket API
Recap: Finger Table Finding a using fingers CSE 486/586 Distributed Systems Remote Procedure Call Steve Ko Computer Sciences and Engineering University at Buffalo N102" 86 + 2 4! N86" 20 +
More informationLecture 5: Object Interaction: RMI and RPC
06-06798 Distributed Systems Lecture 5: Object Interaction: RMI and RPC Distributed Systems 1 Recap Message passing: send, receive synchronous versus asynchronous No global Time types of failure socket
More informationMiddleware. Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004
Middleware Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004 Outline Web Services Goals Where do they come from? Understanding middleware Middleware as infrastructure Communication
More informationRMI: Design & Implementation
RMI: Design & Implementation Operating Systems RMI 1 Middleware layers Applications, services RMI and RPC request-reply protocol marshalling and external data representation Middleware layers UDP and TCP
More informationDistributed Systems. 03. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Fall 2017
Distributed Systems 03. Remote Procedure Calls Paul Krzyzanowski Rutgers University Fall 2017 1 Socket-based communication Socket API: all we get from the OS to access the network Socket = distinct end-to-end
More informationAdvanced Topics in Distributed Systems. Dr. Ayman A. Abdel-Hamid. Computer Science Department Virginia Tech
Advanced Topics in Distributed Systems Dr. Ayman A. Abdel-Hamid Computer Science Department Virginia Tech Communication (Based on Ch2 in Distributed Systems: Principles and Paradigms, 1/E or Ch4 in 2/E)
More informationCS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 22: Remote Procedure Call (RPC)
CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002 Lecture 22: Remote Procedure Call (RPC) 22.0 Main Point Send/receive One vs. two-way communication Remote Procedure
More informationCSCI-1680 RPC and Data Representation. Rodrigo Fonseca
CSCI-1680 RPC and Data Representation Rodrigo Fonseca Administrivia TCP: talk to the TAs if you still have questions! ursday: HW3 out Final Project (out 4/21) Implement a WebSockets server an efficient
More informationCS 417 9/18/17. Paul Krzyzanowski 1. Socket-based communication. Distributed Systems 03. Remote Procedure Calls. Sample SMTP Interaction
Socket-based communication Distributed Systems 03. Remote Procedure Calls Socket API: all we get from the to access the network Socket = distinct end-to-end communication channels Read/write model Line-oriented,
More informationDistributed Information Processing
Distributed Information Processing 6 th Lecture Eom, Hyeonsang ( 엄현상 ) Department of Computer Science & Engineering Seoul National University Copyrights 2016 Eom, Hyeonsang All Rights Reserved Outline
More informationDistributed Program Design Typical Sockets Approach. Remote Procedure Call. Remote Subroutine
Distributed Program Design Typical Sockets Approach Communication-Oriented Design Design protocol first. Build programs that adhere to the protocol. Application-Oriented Design Build application(s). Divide
More informationHello, World! in C. Johann Myrkraverk Oskarsson October 23, The Quintessential Example Program 1. I Printing Text 2. II The Main Function 3
Hello, World! in C Johann Myrkraverk Oskarsson October 23, 2018 Contents 1 The Quintessential Example Program 1 I Printing Text 2 II The Main Function 3 III The Header Files 4 IV Compiling and Running
More informationMessage Passing vs. Distributed Objects. 5/15/2009 Distributed Computing, M. L. Liu 1
Message Passing vs. Distributed Objects 5/15/2009 Distributed Computing, M. L. Liu 1 Distributed Objects M. L. Liu 5/15/2009 Distributed Computing, M. L. Liu 2 Message Passing versus Distributed Objects
More informationChapter 3: Client-Server Paradigm and Middleware
1 Chapter 3: Client-Server Paradigm and Middleware In order to overcome the heterogeneity of hardware and software in distributed systems, we need a software layer on top of them, so that heterogeneity
More informationPRINCIPLES OF OPERATING SYSTEMS
PRINCIPLES OF OPERATING SYSTEMS Tutorial-1&2: C Review CPSC 457, Spring 2015 May 20-21, 2015 Department of Computer Science, University of Calgary Connecting to your VM Open a terminal (in your linux machine)
More informationRemote Procedure Calls, TLI, STREAMS
Remote Procedure Calls, TLI, STREAMS 13 RPC, TLI, STREAMS Hannes Lubich, 2003 2005 Page 1 Goals of this Lecture Understand the design of remote procedure calls in general and the design and programming
More informationCORBA (Common Object Request Broker Architecture)
CORBA (Common Object Request Broker Architecture) René de Vries (rgv@cs.ru.nl) Based on slides by M.L. Liu 1 Overview Introduction / context Genealogical of CORBA CORBA architecture Implementations Corba
More informationVerteilte Systeme (Distributed Systems)
Verteilte Systeme (Distributed Systems) Karl M. Göschka Karl.Goeschka@tuwien.ac.at http://www.infosys.tuwien.ac.at/teaching/courses/ VerteilteSysteme/ Lecture 3: Communication (Part 2) Remote Procedure
More informationLecture 06: Distributed Object
Lecture 06: Distributed Object Distributed Systems Behzad Bordbar School of Computer Science, University of Birmingham, UK Lecture 0? 1 Recap Interprocess communication Synchronous and Asynchronous communication
More informationCSCI-1680 RPC and Data Representation John Jannotti
CSCI-1680 RPC and Data Representation John Jannotti Original Slides from Rodrigo Fonseca Today Defining Protocols RPC IDL Problem Two programs want to communicate: must define the protocol We have seen
More informationRPC Remote Procedure Call
RPC Remote Procedure Call Stand-alone program #include long bin_date(void); char *str_date(long bintime); main(int argc, char **argv) { long lresult; /* return from bin_date */ char *sresult;
More informationChapter 5: Distributed objects and remote invocation
Chapter 5: Distributed objects and remote invocation From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, Addison-Wesley 2005 Figure 5.1 Middleware layers Applications
More informationLightweight RPC. Robert Grimm New York University
Lightweight RPC Robert Grimm New York University The Three Questions What is the problem? What is new or different? What are the contributions and limitations? The Structure of Systems Monolithic kernels
More informationRPC and RMI. 2501ICT Nathan
RPC and RMI 2501ICT Nathan Contents Client/Server revisited RPC Architecture XDR RMI Principles and Operation Case Studies Copyright 2002- René Hexel. 2 Client/Server Revisited Server Accepts commands
More informationCS153: Communication. Chengyu Song. Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian
1 CS153: Communication Chengyu Song Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian 2 Administrivia Homework HW3 is due this Friday June 2nd 3 Recap: OS roles Abstraction Virtualization
More informationDistributed Systems. Lecture 06 Remote Procedure Calls Thursday, September 13 th, 2018
15-440 Distributed Systems Lecture 06 Remote Procedure Calls Thursday, September 13 th, 2018 1 Announcements P0 Due today (Thursday 9/13) How is everyone doing on it? :-) P1 Released Friday 9/14 Dates:
More informationRPC 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
4.3 Remote procedure calls RPC flow Client process Server process Program i = sum (3,7); Procedure sum (j,k) int j,k; {return j+k; Client stub Program Return Call Unpack Pack result para s Invisible to
More informationDS 2009: middleware. David Evans
DS 2009: middleware David Evans de239@cl.cam.ac.uk What is middleware? distributed applications middleware remote calls, method invocations, messages,... OS comms. interface sockets, IP,... layer between
More informationToday: Distributed Objects. Distributed Objects
Today: Distributed Objects Case study: EJBs (Enterprise Java Beans) Case study: CORBA Lecture 23, page 1 Distributed Objects Figure 10-1. Common organization of a remote object with client-side proxy.
More informationChapter 5: Remote Invocation. Copyright 2015 Prof. Amr El-Kadi
Chapter 5: Remote Invocation Outline Introduction Request-Reply Protocol Remote Procedure Call Remote Method Invocation This chapter (and Chapter 6) Applications Remote invocation, indirect communication
More informationAdvanced Distributed Systems
Course Plan and Department of Computer Science Indian Institute of Technology New Delhi, India Outline Plan 1 Plan 2 3 Message-Oriented Lectures - I Plan Lecture Topic 1 and Structure 2 Client Server,
More informationRemote Procedure Call
Remote Procedure Call Timeline Blocked Outline Protocol Stack Presentation Formatting Blocked Computing Blocked Spring 25 CS 461 1 Spring 25 CS 461 2 RCP Components Protocol Stack BLAST: fragments and
More informationChapter 5 Distributed Objects and Remote Invocation
CSD511 Distributed Systems 分散式系統 Chapter 5 Distributed Objects and Remote Invocation 吳俊興 國立高雄大學資訊工程學系 Chapter 5 Distributed Objects and Remote Invocation 5.1 Introduction 5.2 Communication between distributed
More informationRemote Invocation. To do. Request-reply, RPC, RMI. q Today q. q Next time: Indirect communication
Remote Invocation To do q Today q Request-reply, RPC, RMI q Next time: Indirect communication Beyond message passing In DS, all IPC is based on low-level msg passing A bit too low level Modern distributed
More informationHow do modules communicate? Enforcing modularity. Modularity: client-server organization. Tradeoffs of enforcing modularity
How do modules communicate? Enforcing modularity Within the same address space and protection domain local procedure calls Across protection domain system calls Over a connection client/server programming
More informationExternal Data Representation (XDR)
External Data Representation (XDR) Prof. Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Taipei, TAIWAN NTUT, TAIWAN 1 Introduction This chapter examines
More informationThe RPC abstraction. Procedure calls well-understood mechanism. - Transfer control and data on single computer
The RPC abstraction Procedure calls well-understood mechanism - Transfer control and data on single computer Goal: Make distributed programming look same - Code libraries provide APIs to access functionality
More informationLecture 03 Bits, Bytes and Data Types
Lecture 03 Bits, Bytes and Data Types Computer Languages A computer language is a language that is used to communicate with a machine. Like all languages, computer languages have syntax (form) and semantics
More informationMODELS OF DISTRIBUTED SYSTEMS
Distributed Systems Fö 2/3-1 Distributed Systems Fö 2/3-2 MODELS OF DISTRIBUTED SYSTEMS Basic Elements 1. Architectural Models 2. Interaction Models Resources in a distributed system are shared between
More informationAdministrivia. Remote Procedure Calls. Reminder about last time. Building up to today
Remote Procedure Calls Carnegie Mellon University 15-440 Distributed Systems Administrivia Readings are now listed on the syllabus See.announce post for some details The book covers a ton of material pretty
More informationChapter 4. Internet Applications
Chapter 4 Internet Application Protocols 1 Internet Applications! Domain Name System! Electronic mail! Remote login! File transfer! World Wide Web! All use client-server model 2 Names! Internet communication
More informationFinal CSE 131B Spring 2004
Login name Signature Name Student ID Final CSE 131B Spring 2004 Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 (25 points) (24 points) (32 points) (24 points) (28 points) (26 points) (22 points)
More informationCommunication in Distributed Systems
Communication in Distributed Systems Sape J. Mullender Huygens Systems Research Laboratory Universiteit Twente Enschede 1 Introduction Functions of Communication Transport data between processes, machines,
More informationDistributed Systems. The main method of distributed object communication is with remote method invocation
Distributed Systems Unit III Syllabus:Distributed Objects and Remote Invocation: Introduction, Communication between Distributed Objects- Object Model, Distributed Object Modal, Design Issues for RMI,
More informationLecture 8: February 17
CMPSCI 677 Operating Systems Spring 2016 Lecture 8: February 17 Lecturer: Prashant Shenoy Scribe: Ravi Choudhary 8.1 Communications in Distributed Systems This lecture will deal with communication between
More informationCSCI-1680 RPC and Data Representation. Rodrigo Fonseca
CSCI-1680 RPC and Data Representation Rodrigo Fonseca Today Defining Protocols RPC IDL Problem Two programs want to communicate: must define the protocol We have seen many of these, across all layers E.g.,
More informationPrograms. Function main. C Refresher. CSCI 4061 Introduction to Operating Systems
Programs CSCI 4061 Introduction to Operating Systems C Program Structure Libraries and header files Compiling and building programs Executing and debugging Instructor: Abhishek Chandra Assume familiarity
More informationDistributed Systems Principles and Paradigms. Distributed Object-Based Systems. Remote distributed objects. Remote distributed objects
Distributed Systems Principles and Paradigms Maarten van Steen VU Amsterdam, Dept. Computer Science steen@cs.vu.nl Chapter 10: Version: December 10, 2012 1 / 22 10.1 Architecture 10.1 Architecture Remote
More informationIPC. Communication. Layered Protocols. Layered Protocols (1) Data Link Layer. Layered Protocols (2)
IPC Communication Chapter 2 Inter-Process Communication is the heart of all DSs. Processes on different machines. Always based on low-level message passing. In this chapter: RPC RMI MOM (Message Oriented
More informationStructured communication (Remote invocation)
Prof. Dr. Claudia Müller-Birn Institute for Computer Science, Networked Information Systems Structured communication (Remote invocation) Nov 8th, 2011 Netzprogrammierung (Algorithmen und Programmierung
More informationA Report on RMI and RPC Submitted by Sudharshan Reddy B
A Report on RMI and RPC Submitted by Sudharshan Reddy B Abstract: This report mainly explains the RMI and RPC technologies. In the first part of the paper the RMI technology is briefly explained and in
More informationChapter 4 Communication
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN Chapter 4 Communication Layered Protocols (1) Figure 4-1. Layers, interfaces, and protocols in the OSI
More informationUniversity of Pittsburgh Computer Science Department
University of Pittsburgh Computer Science Department Course : CS - 2510 Advanced Computer Operating Systems Term : Fall 2015 Meetings : TTh 11:00 a.m. - 12:15 p.m. Classroom : 5313 Sennott Square Instructor
More informationstruct foomsg { u_int32_t len; }
RPC 1. Group presentation 2. Notes from reviews: a. 3. Notes to discuss: a. Interface definition: can you just use header files? i. Separate language or integrate into source? ii. Stub compiler or normal
More informationComputer Science 322 Operating Systems Mount Holyoke College Spring Topic Notes: C and Unix Overview
Computer Science 322 Operating Systems Mount Holyoke College Spring 2010 Topic Notes: C and Unix Overview This course is about operating systems, but since most of our upcoming programming is in C on a
More informationBuilding up to today. Remote Procedure Calls. Reminder about last time. Threads - impl
Remote Procedure Calls Carnegie Mellon University 15-440 Distributed Systems Building up to today 2x ago: Abstractions for communication example: TCP masks some of the pain of communicating across unreliable
More informationCS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco
CS 326 Operating Systems C Programming Greg Benson Department of Computer Science University of San Francisco Why C? Fast (good optimizing compilers) Not too high-level (Java, Python, Lisp) Not too low-level
More informationWeb Services Architecture and Programming
Web Services Architecture and Programming Working remotely and distributable Association For Information Security www.iseca.org Nikolay Nedyalkov n.nedyalkov@iseca.org What are Web Services? Depends on
More informationSAI/ST course Distributed Systems
SAI/ST course Distributed Systems 2013, Sep. 26 Oct 01 Lecture 3: Communication Agenda Overview Concepts Organization in layers IPC primitives Direct communication Indirect communication R.H. Mak 27-9-2013
More information