A Brief Intro to the RPC Project Framework

Slides:



Advertisements
Similar presentations
RPC Remote Procedure Call Dave Hollinger Rensselaer Polytechnic Institute Troy, NY.
Advertisements

Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
GridRPC Sources / Credits: IRISA/IFSIC IRISA/INRIA Thierry Priol et. al papers.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes.
Remote Method Invocation
Distributed Systems Lecture #3: Remote Communication.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Sockets  Defined as an “endpoint for communication.”  Concatenation of IP address + port.  Used for server-client communication.  Server waits for.
Introduction to Remote Method Invocation (RMI)
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 12 Communicating over.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Other Topics RPC & Middleware.
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
Remote Procedure Call Andrew Whitaker CSE451. Remote Procedure Call RPC exposes a programming interface across machines: interface PriceService { Price.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
Remote Shell CS230 Project #4 Assigned : Due date :
Copyright 2012, 2013 & 2015 – Noah Mendelsohn COMP 150-IDS Ping Demonstration Programs & Makefile / C++ Hints Noah Mendelsohn Tufts University
Copyright 2012 & 2015 – Noah Mendelsohn A Brief Intro to the RPC Project Framework Noah Mendelsohn Tufts University
Distributed Computing A Programmer’s Perspective.
Remote Procedure Call and Serialization BY: AARON MCKAY.
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
1 Distributed Programming low level: sending data among distributed computations higher level: supporting invocations among distributed computations network.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
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.
CS 5204 Fall 00 1 Distributed Programming low level: sending data among distributed computations higher level: supporting invocations among distributed.
Remote Method Invocation Internet Computing Workshop Lecture 17.
Models of Distributed Computing
Client-Server Communication
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Sockets and Beginning Network Programming
Prof. Leonardo Mostarda University of Camerino
Chapter 5 Remote Procedure Call
Chapter 3 Internet Applications and Network Programming
MCA – 405 Elective –I (A) Java Programming & Technology
Remote Method Invocation
COMP 117 Ping Demonstration Programs & Makefile / C++ Hints
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
COMP 117 Ping Demonstration Programs & Makefile / C++ Hints
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
Remote Procedure Call (invocation) RPC
Remote Procedure Call (RPC) RPC – RMI - Web Services.
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
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.
Chapter 3 Socket API © Bobby Hoggard, Department of Computer Science, East Carolina University These slides may not be used or duplicated without permission.
Lecture 6: RPC (exercises/questions)
An Introduction to Internetworking
Remote invocation (call)
Remote Procedure Call Hank Levy 1.
COMP 150-IDS Ping Demonstration Programs & Makefile / C++ Hints
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
Distributed System using Web Services
Remote Procedure Call Hank Levy 1.
Last Class: Communication in Distributed Systems
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Presentation transcript:

A Brief Intro to the RPC Project Framework COMP 117: Internet Scale Distributed Systems (Spring 2017) A Brief Intro to the RPC Project Framework Noah Mendelsohn Tufts University Email: noah@cs.tufts.edu Web: http://www.cs.tufts.edu/~noah

Getting the sample code git clone /comp/117/files/RPC.samples Instructions and details in RPC assignment handout

TCP vs. UDP

Streams not messages UDP messages TCP streams COMP 117 support Limited size Best-effort delivery If they arrive, you get the whole message at once TCP streams Reliable delivery unless connection breaks Byte streams: “unlimited” length, no message boundaries You can write 50 bytes then 30 bytes; reader can read 35 bytes then 45 You might do a 10000byte write, but reader may see only a few on first read COMP 117 support Framework: c150streamsocket.h Demo code: pingstreamclient.cpp, pingstreamserver.cpp (in RPC.samples) You do not have to submit modified versions of these

Review From the Earlier Lecture On Remote Procedure Call

RPC: Call remote functions automatically float sqrt(float n) { …compute sqrt… return result; } x = sqrt(4) CPU Memory Storage CPU Memory Storage float sqrt(float n) { send n; read s; return s; } proxy Request invoke sqrt(4) void doMsg(Msg m) { s = sqrt(m.s); send s; } stub Response result=2 (no exception thrown) Interface definition: float sqrt(float n); Proxies and stubs generated automatically RPC provides transparent remote invocation

How the Demo Programs Work

Demo program uses function w/no arguments This client int main() { func1() } simplefunctionclient.cpp CPU Memory Storage CPU Memory Storage

Demo program uses function w/no arguments …is calling this function int main() { func1() } void func1() { return; } simplefunctionclient.cpp CPU Memory Storage CPU Memory Storage Interface definition file: simplefunction.idl void func1();

Demo program uses function w/no arguments Sample proxy int main() { func1() } void func1() { return; } simplefunctionclient.cpp CPU Memory Storage CPU Memory Storage simplefunction.cpp void void() { send func1; read DONE; } simplefunction.proxy.cpp

Demo program uses function w/no arguments int main() { func1() } void func1() { return; } simplefunctionclient.cpp CPU Memory Storage CPU Memory Storage simplefunction.cpp void void() { send func1; read DONE; } simplefunction.proxy.cpp Proxy and stub names always match IDL file name

Demo program uses function w/no arguments int main() { func1() } simplefunctionclient.cpp CPU Memory Storage CPU Memory Storage rpcserver is generic main program…doesn’t depend on IDL or func1 void void() { send func1; read DONE; } simplefunction.proxy.cpp int Main() { …loop accepting connections{ while(!eof){ dispatchFunction() } } } rpcserver.cpp linked as simplefunctionserver

Demo program uses function w/no arguments int main() { func1() } simplefunctionclient.cpp CPU Memory Storage CPU Memory Storage void void() { send func1; read DONE; } simplefunction.proxy.cpp …but we name the executable to match the particular use (simplefunctionserver) int Main() { …loop accepting connections{ while(!eof){ dispatchFunction() } } } rpcserver.cpp linked as simplefunctionserver

Demo program uses function w/no arguments All stubs provide a dispatchFunction int main() { func1() } simplefunctionclient.cpp CPU Memory Storage CPU Memory Storage void void() { send func1; read DONE; } simplefunction.proxy.cpp void dispatchFunction() { read from socket call __func1() } void __func1() { read args from stream call func1 send response int Main() { …loop accepting connections{ while(!eof){ dispatchFunction() } } } rpcserver.cpp linked as simplefunctionserver simplefunction.stub.cpp

Demo program uses function w/no arguments …that reads function names from the network and calls the right stub int main() { func1() } simplefunctionclient.cpp CPU Memory Storage CPU Memory Storage void void() { send func1; read DONE; } simplefunction.proxy.cpp void dispatchFunction() { read from socket call __func1() } void __func1() { read args from stream call func1 send response int Main() { …loop accepting connections{ while(!eof){ dispatchFunction() } } } rpcserver.cpp linked as simplefunctionserver simplefunction.stub.cpp

Demo program uses function w/no arguments int main() { func1() } void func1() { return; } simplefunctionclient.cpp CPU Memory Storage CPU Memory Storage simplefunction.cpp void void() { send func1; read DONE; } simplefunction.proxy.cpp Response DONE Request invoke func1() void dispatchFunctiong() { read from socket call __func1() } void __func1() { read args from stream call func1 send response int Main() { …loop accepting connections{ while(!eof){ dispatchFunction() } } } rpcserver.cpp linked as simplefunctionserver simplefunction.stub.cpp

Demo program uses function w/no arguments int main() { func1() } void func1() { return; } simplefunctionclient.cpp You’ll be implementing proxies and stubs like these…first by hand…then using your RPC generator CPU Memory Storage CPU Memory Storage simplefunction.cpp void void() { send func1; read DONE; } Response DONE Request invoke func1() void dispatchFunctiong() { read from socket call __func1() } void __func1() { read args from stream call func1 send response int Main() { …loop accepting connections{ while(!eof){ dispatchFunction() } } } simplefunction.proxy.cpp Interface definition file: simplefunction.idl rpcserver.cpp linked as simplefunctionserver simplefunction.stub.cpp

Demo program uses function w/no arguments int main() { func1() } void func1() { return; } simplefunction.proxy.cpp & simplefunction.stub.cpp are provided for you as samples … Yours will have to support other IDL files with functions that take arguments and return values! simplefunctionclient.cpp CPU Memory Storage CPU Memory Storage simplefunction.cpp void void() { send func1; read DONE; } Response DONE Request invoke func1() void dispatchFunctiong() { read from socket call __func1() } void __func1() { read args from stream call func1 send response int Main() { …loop accepting connections{ while(!eof){ dispatchFunction() } } } simplefunction.proxy.cpp Interface definition file: simplefunction.idl rpcserver.cpp linked as simplefunctionserver simplefunction.stub.cpp