You are required to implement a crude version of Remote Procedure [login to view URL] this would require some degree of compiler support. However, we will simplify theinterface so that the basic RPC is there, and it is only a matter of syntactic sugar to clean [login to view URL] the RPC implementation, we require three processes: a client, a server, and a binder. Youwill implement, using TCP/Sockets, the RPC library including a number of functions describedlater, and the binder. It is up to the user (TA in this case) to write the client, the main serverprogram, the server function implementations, and the server function stubs using your librarywhere applicable. You may assume that they are (almost) perfect coders (this assumption is thereso that you don't have to do a ton of code checking for correctness!). The mistakes they may make,and which you have to check for, are things like not registering before invoking the server executefunction, calling a RPC that isn't there yet, starting the client before the server, etc. They nevermake mistakes with respect to parameters in the function [login to view URL] system can be briefly divided into the following three portions
1. The client requests from the binder the server identier (IP address or hostname) and portnumber of a server capable of handling the request. The client side marshals the parametersinto a request message, sends the request to the server, retrieves the result and returns.
2. The server creates a connection socket that listens for client requests and, on receiving arequest, identies the desired server procedure, calls it with the appropriate parameters (ex-tracted from the client request), and returns the results to the client. The server registers theserver procedures with the binder and keeps a seperate TCP connection to the binder openso the binder knows it is still up.
3. The binder takes registration requests from server processes and maintains a database ofservers and associated procedures. It also services location requests from client processes,either returning the server identier (IP address or hostname) and port information for asuitable server or indicating that no such server exists. Finally, since we may wish to terminatethe entire system in a reasonably graceful fashion, the binder also handles terminate-request messages causing it to exit and, indirectly, also causing all servers to terminate. Clients canbe expected to terminate themselves gracefully without assistance.