RPC Project Using either sockets or TLI, implement Remote Procedure Calls between two distinct machines that are communicating over an Ethernet network.

Slides:



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

Remote Procedure Call Design issues Implementation RPC programming
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
Remote Method Invocation
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
Remote Object Invocation
FONG CHAN SING (143334) WONG YEW JOON (143388). JAVA RMI is a distributive system programming interface introduced in JDK 1.1. A library that allows an.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
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.
Sockets  Defined as an “endpoint for communication.”  Concatenation of IP address + port.  Used for server-client communication.  Server waits for.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Communication in Distributed Systems –Part 2
Client-Server Communication Sockets Remote Procedure Calls Remote Method Invocation (Java)
Remote Procedure Calls. 2 Client/Server Paradigm Common model for structuring distributed computations A server is a program (or collection of programs)
VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital.
Fundamentals of Python: From First Programs Through Data Structures
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
Socket Programming -What is it ? -Why bother ?. Basic Interface for programming networks at transport level It is communication end point Used for inter.
NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)
Programming Network Servers Topic 6, Chapters 21, 22 Network Programming Kansas State University at Salina.
Elementary TCP Sockets
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 12 Communicating over.
An program As a simple example of socket programming we can implement a program that sends to a remote site As a simple example of socket.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
+ A Short Java RMI Tutorial Usman Saleem
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26.
Problems with Send and Receive Low level –programmer is engaged in I/O –server often not modular –takes 2 calls to get what you want (send, followed by.
Implementing Remote Procedure Calls Authored by Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presented by Lars Larsson.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
The Socket Interface Chapter 21. Application Program Interface (API) Interface used between application programs and TCP/IP protocols Interface used between.
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
 Remote Method Invocation  A true distributed computing application interface for Java, written to provide easy access to objects existing on remote.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 43 Remote Method Invocation.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Distributed Computing A Programmer’s Perspective.
CE Operating Systems Lecture 13 Linux/Unix interprocess communication.
1 Developing Application in Distributed Computing Environment (DCE)
Remote Procedure Calls CS587x Lecture Department of Computer Science Iowa State University.
Remote Procedure Call Andy Wang Operating Systems COP 4610 / CGS 5765.
Mark Stanovich Operating Systems COP Primitives to Build Distributed Applications send and receive Used to synchronize cooperating processes running.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
Distributed objects and remote invocation Pages
RPC Model, Stubs and Skeletons Divya Nampalli
Communications in Client-Server Systems the details…
1 K. Salah Application Layer Module K. Salah Network layer duties.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 29 Remote Method.
Client-Server Communication
MCA – 405 Elective –I (A) Java Programming & Technology
Remote Method Invocation
Chapter 2: System Structures
Chapter 3: Windows7 Part 4.
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Sarah Diesburg Operating Systems COP 4610
Remote Procedure Call (RPC)
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
Chapter 40 Remote Method Invocation
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
Chapter 46 Remote Method Invocation
Remote Procedure Call Hank Levy 1.
Chapter 46 Remote Method Invocation
Remote Procedure Call Hank Levy 1.
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)
Presentation transcript:

RPC Project Using either sockets or TLI, implement Remote Procedure Calls between two distinct machines that are communicating over an Ethernet network Note that procedures in this sense are really functions – functions return a value whereas procedures do not Remote functions can pass any number of parameters (including 0) and all parameters are passed by value

Calls function foo on workstation 2 (ws2) from workstation 1 (ws1) ws2:foo(a,b,c); ws2: is a stub function that receives foo(a,b,c) as argv/argc The stub function ws2: – marshals function name and function parameters into data packet –establishes socket connection with server (workstation 2) –sends data packet over socket link –waits for reply from server (reply is a data packet with function return value) –receives reply data packet from server –un-marshals data packet –prints out function return value to standard I/O Actions at Calling Terminal

Actions at Called Terminal Invoke daemon monitor to listen for socket communications from client – the daemon will: –Receive marshaled request –Un-marshal request –Assemble request into local function call with parameters –Make local function call –Receive return value –Marshal return value into data packet –Send data packet over network using sockets

Protocol for RPC Client Process rpc rpc call return marshaled marshaled request return client kernel logical call logical return network Server Process ordinary ordinary call return marshaled marshalled request return server kernel client program client Stubserver stub server functions network services

Corrections I was wrong when I indicated that the remote function would be called from the command prompt at the client terminal. In reality, it should be called from a program running on the client terminal I was also wrong when I said the server’s forked child would probably execute the function with an exec. After marshaling at the server the call will be made like a normal function call.

Other Requirements You should make at least three different RPC calls, one with no parameters, one with one parameter, and one with multiple parameters. The minimum RPC project requirements is to make an RPC call from a host machine that prints out something on a remote machine such as “hello world” You will not get an A+ by doing the minimum requirements, but you will satisfy the project requirement

Other Requirements (cont) You must use sockets, TLI or a similar network protocol that is the level of difficulty of the sockets and TLI we have studied in the book. Do not use STREAMS You must marshal the function name and parameters at the client, use system calls (i.e., sockets) to pass them over the network, un- marshal them at server, form the function name and parameters into a function call, marshal the function return value at the server, pass the return value over the network, un-martial the return value at the client, and use the return value in the calling program’s mathematical expression

Other Requirements (cont) It is O.K. with me if you write your code so that parameters and the return value are either integer, floating point or void type I will accept integer or void types as the minimum requirements

Other Requirements (cont) You can run and test your RPC program on a single workstation The client stub should be written as a separately compiled module and the server stub should be written as a background daemon A short program will have an RPC call in it that makes a call to the client stub and passes the function call to the stub as parameters The server should either fork processes to handle client requests or use threads to do the same – However, you can elect to do the single server system as minimum requirements

Other Requirements (cont) In a real system, the server workstation’s name would be the name of the client stub There would be a client stub for every workstation that it is possible to call upon We are probably going to be forced by resource availability into using only one workstation, but we can simulate a larger system with multiple client and server stubs

Other Requirements (cont) You can simulate two or more clients by having two client stubs that are called upon by two programs executing in the background You can simulate two or more servers by having two server background daemon processes – Use different client stub names to select the appropriate server

Other Requirements (cont) Don’t forget to kill background processes when you are finished with them !!!