Implementing dynamic binding for rpc


Implementing Dynamic Binding for RPC:

In this assignment you will use sockets to implement dynamic binding and a simplified form of RPC. You will have three programs: a client, a server and a name server. The client comprises of a test program which calls your remote procedure. This program is linked to a client stub which does the usual jobs: marshalling parameters, connecting to the server, sending a request, receiving the reply and returning the outcome to the test program. You must do the connection by using Internet domain stream sockets. The server must accept requests, unmarshall the parameters, call the remote procedure and return the result. The server is linked to the remote procedure. You must write a client stub which has the same name, number of parameters and return type as your remote procedure. In another words, you are implementing a limited form of RPC. The client and server programs must run on different Linux machines. Your implementation must use dynamic binding meaning that your client program does not know the address of the server. Rather it knows the IP address and port number of a third program - the name server. The name server accepts requests containing an identifier for the remote procedure and returns a handle containing the address of the server to be used in contacting the server or an error message if it does not know where the server is. The connection from the client to the name server must also be done by using stream sockets. The server will as well contact the name server to register (it notifies the name server of its identifier and its address). When the server shuts down it deregisters with the name server.

Your name server must be written in such a way that it could handle more than one remote procedure. Your client stub must signal to the client if it cannot find the server by raising a signal. Your test program should be written in such a manner that we can test the following:

a) Server registers;

b) Client gets handle;

c) Client calls remote procedure and gets result;

d) Server deregisters and moves then is successfully contacted by client which formerly held a handle;

e) Server deregisters, client stub which previously held a handle can’t contact server thus it raises a signal. Explain the procedure to test each of these cases in your readme file.

Extra credit: Further implement RPC by automatically generating client and server stubs from the IDL file. Your generator (a stand-alone program) must work on general files (not just one specific file). The file (whose format you can decide on) must allow one remote procedure to be explained. The file must give the name of the remote procedure, an identifier for the remote procedure, the names and types of parameters and the return type. Parameters can be integers, characters, or arrays of integers or characters.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Implementing dynamic binding for rpc
Reference No:- TGS0908

Expected delivery within 24 Hours