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

•Local procedure parameter passing

–Call-by-value

–Call-by-reference: arrays, complex data structures

•Remote procedure calls simulate this through:

–Stubs – proxies

–Flattening – marshalling

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

Steps of a Remote Procedure Call

Client and Server Stubs

•Principle of RPC between a client and server program.

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 parameters is called marshalling

•Stub compiler generates stub automatically from specs in an Interface Definition Language (IDL)‏

–Simplifies programmer task

Example of RPC

Example of RPC
error: Content is protected !!