[Previous] [Contents] [Next]

Chapter Nineteen

The Network Protocol

While COM+ is usually thought of as a specification for building interoperable components, when you use it for distributed communications it is simply a high-level network protocol that enables objects to work together across a network. From this perspective, COM+ is a high-level network protocol because it is built on top of several layers of existing protocols.

For example, say that a computer has an Ethernet network interface card and is using User Datagram Protocol (UDP). The layering of protocols ranges from the Ethernet frame at the lowest level to COM+ at the highest. Sandwiched in the middle are Internet Protocol (IP), UDP, and Remote Procedure Calls (RPCs), as shown in Figure 19-1. This is just one of many possible configurations—any available protocols can be used below the RPC layer. COM+ automatically chooses the best underlying network protocol based on the protocols available on the client and server machines.

Click to view at full size.

Figure 19-1. An example of the layering of protocols from the Ethernet frame to COM+.

It can also be useful to think of a COM+ protocol stack in terms of the Open Systems Interconnection (OSI) seven-layer model. Figure 19-2 shows this model juxtaposed with our sample protocol stack. The figure shows how the COM+ protocol stack fits into the OSI seven-layer model on the Microsoft Windows platform. Different operating systems might implement the protocols at different layers.

Click to view at full size.

Figure 19-2. The OSI seven-layer model and the corresponding sample COM+ protocol stack.

The packet sent across the network for each protocol in the protocol stack consists of a header followed by the actual data. Each protocol considers the protocol directly above it in the protocol stack as part of its data. For example, IP consists of a header followed by data; this IP data actually consists of the header for UDP followed by UDP's data. Thus, a packet that is transmitted across the network contains the header and data sections of each protocol in the protocol stack. This transmission packet is depicted in Figure 19-3.

Although it is convenient to think of COM+ as an independent network protocol layered on top of the RPC protocol, this is not really the case. COM+ is actually akin to a parasite on its RPC host. It infects the RPC header and data, using the fields of the RPC structures for its own devices. Thus, to better indicate the close relationship between the RPC and the COM+ protocol at the network level, the COM+ network protocol is often called Object RPC, or ORPC. ORPC leverages the functionality of the Open Software Foundation (OSF) Distributed Computing Environment (DCE) RPC network protocol.

Click to view at full size.

Figure 19-3. A network transmission packet.

For example, the authentication, authorization, and message integrity features of the RPC protocol are present in ORPC. ORPC extends the standard RPC protocol in two areas:

Most discourse on COM+ focuses on the fundamental programming architecture. In other words, you are told what COM+ function to call in order to perform a specific task. This chapter examines COM+ from the bottom up. By analyzing the data packets transmitted across a network during the execution of COM+ applications, you can learn a lot about how the COM+ remoting architecture works. This knowledge will increase your overall understanding of the COM+ programming model and can help you design and develop better components.