CHAPTER 18 THE .NET REMOTING LAYER 567 (Free web hosts)
CHAPTER 18 THE .NET REMOTING LAYER 567 Namespace Meaning in Life System.Runtime.Remoting.Proxies This namespace contains types that provide functionality for proxy objects. System.Runtime.Remoting.Services This namespace defines a number of common base classes (and interfaces) that are typically only leveraged by other intrinsic remoting agents. Understanding the .NET Remoting Framework When clients and servers exchange information across application boundaries, the CLR makes use of several low-level primitives to ensure the entities in question are able to communicate with each other as transparently as possible. This means that as a .NET programmer, you are not required to provide reams and reams of grungy networking code to invoke a method on a remote object. Likewise, the server process is not required to manually pluck a network packet out of the queue and reformat the message into terms the remote object can understand. As you would hope, the CLR takes care of such details automatically using a default set of remoting primitives (although you are certainly able to get involved with the process if you so choose). In a nutshell, the .NET remoting layer revolves around a careful orchestration that takes place between four key players: Proxies Messages Channels Formatters Let s check out each entity in turn and see how their combined functionality facilitates remote method invocations. Understanding Proxies and Messages Clients and server objects do not communicate via a direct connection, but rather through the use of an intermediary termed a proxy. The role of a .NET proxy is to fool the client into believing it is communicating with the requested remote object in the same application domain. To facilitate this illusion, a proxy has the identical interface (i.e., members, properties, fields, and whatnot) as the remote type it represents. As far as the client is concerned, a given proxy is the remote object. Under the hood, however, the proxy is forwarding calls to the remote object. Formally speaking, the proxy invoked directly by the client is termed the transparent proxy. This CLR autogenerated entity is in charge of ensuring that the client has provided the correct number of (and type of) parameters to invoke the remote method. Given this, you can regard the transparent proxy as a fixed interception layer that cannot be modified or extended programmatically. Assuming the transparent proxy is able to verify the incoming arguments, this information is packaged up into another CLR-generated type termed the message object. By definition, all message objects implement the System.Runtime.Remoting.Messaging.IMessage interface: public interface IMessage { IDictionary Properties { get; } }
In case you need quality webspace to host and run your web applications, try our personal web hosting services.