The .NET Remoting Architecture
The .NET remoting architecture is a modular and extensible architecture. As shown in Figure 10-9, the basic building blocks on the client side are proxies, formatters, and transport channels. On the host side, the building blocks are transport channels, formatters, and call dispatchers. In addition, .NET provides a way to uniquely locate and identify remote objects. This section provides an overview of the remoting architecture’s building blocks and how they interact with each other.
Figure 10-9. .NET remoting architecture
Client-Side Processing
The client never interacts with a remote object directly. Instead, it interacts with a proxy, which provides the exact same public entry points as the remote object. It’s the proxy’s job to allow the client to make a method call or access a property on it, and then to marshal that call to the actual object. Every proxy is bound to at most one object, although multiple proxies can access a single object. The proxy also knows where the object is. When the client makes a call on the proxy (Step 1 in Figure 10-9), the proxy takes the parameters to the call (the stack frame), creates a message object, and asks a formatter object to process the message (Step 2 in Figure 10-9). The formatter serializes the message object and passes it to a channel object, to transport to the remote object (Step 3 in Figure 10-9). While ...
Get Programming .NET Components, 2nd Edition 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.