Presentation is loading. Please wait.

Presentation is loading. Please wait.

REQUEST/REPLY COMMUNICATION

Similar presentations


Presentation on theme: "REQUEST/REPLY COMMUNICATION"— Presentation transcript:

1 REQUEST/REPLY COMMUNICATION
BHAVIN KANSARA

2 OBJECTIVE Request/Reply Communication RPC ( Remote Procedure Call )
RPC Operation Issues Associated with RPC parameter passing binding compilation failure handling security Sun’s secure RPC GridRPC

3 REQUEST/REPLY COMMUNICATION
Most widely used request/reply communication model is Remote Procedure Call (RPC)

4 Neither message passing nor I/O at all are visible to the programmer
WHAT IS RPC Process on Procedure P machine M1 on machine M2 Calls M1 is suspended M2 executes P When M2 returns, controls back to M1 Neither message passing nor I/O at all are visible to the programmer This method is known as Remote Procedure Call (RPC)

5 RPC: STUB COMPONENTS -- Program subsystems used by client or server to initiate an RPC request -- The stubs are responsible for managing all details of the remote communication between client and server Client calls client stub residing on local machine ,responsible for packing the call and its parameters into a message format On server side, a server stub unpacks the message into call request

6 RPC OPERATION

7 ISSUES ASSOCIATED WITH RPC
Parameter passing Binding Compilation Failure handling Security

8 PARAMETER PASSING Parameter passing methods
Functions in an application that runs in a single process may collaborate via parameters and/or global variables Passing parameters is typically the only way that RPC-based clients and servers share information Parameter-passing has following possible modes: IN: pass info from caller to callee OUT: callee writes a value in the caller IN/OUT: caller tells callee value of var, which may be updated by callee Parameter passing methods Call by value Call by reference Call by copy/restore

9 PARAMETER PASSING Call by Value Call by copy/restore IN Mode
simple to handle Value passed to procedure is copied to local variable can’t have an effect on caller variable Call by reference IN/OUT mode Much harder to handle Pass pointer address Same memory location is referred Call by copy/restore Call by value + call by reference Call by value at entry of procedure and restricts the call by reference to the exit of the call Results are copied back to the calling procedure at the completion of the called procedure

10 Manages mapping between program number and port number
BINDING Manages mapping between program number and port number When server machine is unknown, the client will need to locate the server machine by contacting directory server to locate address of server system

11 BINDING Server starts  registers its communication endpoint by sending request to port mapper  that contains server’s program, version number and port number

12 BINDING Client process contact port mapper to obtain handler for accessing server with specific program and version number. This is done by RPC run-time library routine create.

13 BINDING The port mapper returns the port number of the server to the client system after verifying the program and version number.

14 BINDING Client system builds client handle for the client process for subsequent use in the remote procedure call. Binding process establish socket connection between client and server

15 RPC COMPILATION The compilation of RPC requires three major components in the RPC package An interface specification file RPC generator which takes the interface specification file as input and produces the client and server stub procedure source code as output A run-time library for the supporting execution of RPC

16 RPC COMPILATION

17 RPC COMPILATION

18 RPC COMPILATION

19 RPC FAILURE HANDLING Failures can be of three types Lost message
Server crash Client crash

20 RPC FAILURE HANDLING Lost Message
Sever is allocated and request message has been sent Message may delay or lost Lost message are eventually detected by time out or no response form server Retransmission Request was not lost but delayed  server will receive two request SOLUTION --- Request can be executed any number of times with same effect --- using sequence numbers

21 Most desirable  Exactly once  difficult to achieve
RPC FAILURE HANDLING Server Crash Three possible assumptions for the RPC semantics in the presence of failure : " Exactly once? Server crashes before request arrives server crashes before reply server crashes after reply, but reply dropped " At most once? If server crashes, can’t know if request was done " At least once? Keep retrying across crashes, but may be done multiple times Most desirable  Exactly once  difficult to achieve SOLUCTION --- Problem lies in the loss of cache table --- Use at least once semantics and to log the cache table --- When the server recovers  it reloads cache table from log

22 RPC FAILURE HANDLING Client Crash
Before server completes the client request, the server has an orphan computation and its reply is undeliverable. No easy way for the server to detect the disappearance of clients except by using a time-out or by waiting for the failed client to reboot Orphan computations consume server resources Can be eliminated by : By Client : upon reboot of failed client By Server : the server occasionally tries to locate the owners of its remote operations and abort those whose owners can not be found By Expiration : each remote operation is given a maximum lifetime

23 SECURITY RPC is a form of remote execution that allows programs or commands to be executed on other systems. But it also opens doors for attacks from unfriendly remote users Mutual authentication --- identities of clients and server are verified Request Message Client server Reply message server client Message integrity, confidentiality, and originality --- request/reply messages have not been tampered with (integrity), their contents are not revealed ( confidentiality) , and the same message has not appeared more than once ( originality ) Truly generated by Intended for

24 SUN’S SECURE RPC

25 GRIDRPC One of grid programming models
Supports remote procedure calls (RPCs) on the Grid Standardized at GridRPC Standardizing only minimal set of APIs Higher-level features can be built on top Providing several reference implementations Usage scenarios Remote library calls for executing compute-intensive tasks Executing large scale task-parallel processing

26 NINF-G SYSTEM (2000..) Reference implementation of GridRPC
Constructed on top of Globus Globus is introduced in many sites No more security halls are required in introducing Ninf-G2 Ninfied applications can be executed on many sites Globus provides primitive functions/tools for grid computing Concentrating on the development of RPC specific functions Easy to use other tools on Globus Ninf-G2 hides complicated mechanisms of Globus Grid applications/middleware can be easily constructed

27 GRID APPLICATIONS USING NINF-G
Chemical simulation Replica Exchange Monte Carlo Surveying potential energy of molecules Time Dependent Density Functional Theory Simulating time evolution of electron system in molecules Optimization problem Vehicle Routing Searching optimal route for delivery Weather simulation S-model Forecasting global weather change

28 REFERENCES Distributed operating system and algorithms Randy chow, Theodore johnson Remote procedure call - Wikipedia, the free encyclopedia en.wikipedia.org/wiki/Remote_procedure_call Sun RPC GridRPC: A Remote Procedure Call API for Grid Computing Grid technology research center


Download ppt "REQUEST/REPLY COMMUNICATION"

Similar presentations


Ads by Google