Remoting and Location Transparency

Before COM there was RPC, a protocol defined by the Open Software Foundation and known as Remote Procedure Calls (RPC) for a Distributed Computing Environment (DCE). Microsoft implemented this protocol in Windows NT as MS RPC. RPC is a binary protocol meant to run on top of any other network protocol, such as IP or UDP.

MS RPC uses the concept of interfaces. A developer defines an interface using the Interface Definition Language (IDL). The developer also generates code for two stubs (in RPC terminology, both the sender and the receiver are known as stubs). The stub on the client side basically looks like the interface. In other words, it has methods with the same signatures and names as the methods and signatures on the server side. However, the methods in the client stub do not do the real work. They take the parameters of a call and build a byte stream according to the format dictated by RPC. Network Data Representation (NDR) is used to convert the parameters into a representation that can be understood by a number of operating systems. Information is also added about the destination of the byte stream. On the receiving side, an RPC service listens for RPC data on a well-known port. The port number depends on the protocol the server can accept. The service listens for requests, then interprets the byte stream to figure out to which server stub information should be forwarded. The RPC listening service dispatches a thread to communicate with ...

Get COM+ Programming with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.