 California: Sybex, 2002. Chapter 27 RPC Programming This chapter is about the remote procedure call (RPC) programming. It introduces the reader to the concept of writing RPC client-server code. Remote procedure call defines a powerful technology for creating distributed client-server programs. The RPC runtime libraries manage most of the details relating to network proto- cols and communication. With RPC, a client can connect to a server running on another platform. For example, the server could be written for Linux and the client could be written for Win32. The RPC is for distributed environment. 27.1 Introduction Programs communicating over a network need a paradigm for communication. The RPC is used in a distributed environment where communication is required between heterogeneous systems. It follows the client-server model of communica- tion. In a remote procedure call based communication a client makes a procedure call to send a request to the server. The arrival of the request causes the server to dispatch a routine, perform the service the client has requested, and send back the response to the client. The machine implementing the set of network services is called the server and the machine that requests for the service is the client. The server can support more than one version of a remote program. The control moves through two processes in the remote procedure call model. They are the caller process and server pro- cess. The caller process sends a message containing the procedure parameters to the server process and waits for a reply message that contains the procedure results. On arrival of the result, the caller process resumes execution. The server side process is dormant until it gets a call message. When the server process gets a request, it Fundamentals of EMS, NMS and OSS/BSS will process the same and send a response. It can be seen that only one of the two processes is active at any given time in the RPC model. The RPC call model can support both synchronous and asynchronous calls. Asynchronous 