.NET Remoting is a
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
application programming interface
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standard that des ...
(API) for
interprocess communication
In computer science, interprocess communication (IPC) is the sharing of data between running processes in a computer system. Mechanisms for IPC may be provided by an operating system. Applications which use IPC are often categorized as clients ...
released in 2002 with the 1.0 version of
.NET Framework. It is one in a series of Microsoft technologies that began in 1990 with the first version of
Object Linking and Embedding
Object Linking and Embedding (OLE) is a proprietary technology developed by Microsoft that allows embedding and linking to documents and other objects. For developers, it brought OLE Control Extension (OCX), a way to develop and use custom user ...
(OLE) for 16-bit
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
. Intermediate steps in the development of these technologies were
Component Object Model
Component Object Model (COM) is a binary-interface technology for software components from Microsoft that enables using objects in a language-neutral way between different programming languages, programming contexts, processes and machines ...
(COM) released in 1993 and updated in 1995 as COM-95,
Distributed Component Object Model
Distributed Component Object Model (DCOM) is a proprietary Microsoft technology for communication between software components on networked computers. DCOM, which originally was called "Network OLE", extends Microsoft's COM, and provides the co ...
(DCOM), released in 1997 (and renamed
ActiveX
ActiveX is a deprecated software framework created by Microsoft that adapts its earlier Component Object Model (COM) and Object Linking and Embedding (OLE) technologies for content downloaded from a network, particularly from the World Wide W ...
), and COM+ with its
Microsoft Transaction Server
Microsoft Transaction Server (MTS) was software that provided services to Component Object Model (COM) software components, to make it easier to create large distributed applications. The major services provided by MTS were automated transaction ...
(MTS), released in 2000. It is now superseded by
Windows Communication Foundation
The Windows Communication Foundation (WCF), previously known as Indigo, is a free and open-source runtime and a set of APIs in the .NET Framework for building connected, service-oriented applications.
.NET Core 1.0, released 2016, did not s ...
(WCF), which is part of the
.NET Framework 3.0.
Like its family members and similar technologies such as
Common Object Request Broker Architecture
The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) designed to facilitate the communication of systems that are deployed on diverse platforms. CORBA enables collaboration between sy ...
(CORBA) and
Java's remote method invocation (RMI), .NET Remoting is complex, yet its essence is straightforward. With the assistance of operating system and network agents, a client process sends a message to a server process and receives a reply.
Overview
.NET Remoting allows an application to make an
object
Object may refer to:
General meanings
* Object (philosophy), a thing, being, or concept
** Object (abstract), an object which does not exist at any particular time or place
** Physical object, an identifiable collection of matter
* Goal, an a ...
(termed ''remotable object'') available across ''remoting boundaries'', which includes different
appdomains,
processes or even different computers connected by a network.
The .NET Remoting runtime hosts the listener for requests to the object in the
appdomain of the server application. On the client end, any requests to the remotable object are proxied by the .NET Remoting runtime over
Channel
objects, that encapsulate the actual transport mode, including
TCP streams,
HTTP
HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, wher ...
streams and
named pipes. As a result, by instantiating proper
Channel
objects, a .NET Remoting application can be made to support different communication protocols without recompiling the application. The runtime itself manages the act of
serialization
In computing, serialization (or serialisation, also referred to as pickling in Python (programming language), Python) is the process of translating a data structure or object (computer science), object state into a format that can be stored (e. ...
and
marshalling of objects across the client and server appdomains.
.NET Remoting makes a reference of a remotable object available to a client application, which then instantiates and uses a remotable object as if it were a local object.
However, the actual code execution happens at the server-side. A remotable object is identified by ''Activation
URL
A uniform resource locator (URL), colloquially known as an address on the Web, is a reference to a resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identi ...
s'' and are instantiated by a connection to the URL.
A listener for the object is created by the remoting runtime when the server registers the channel that is used to connect to the remotable object. At the client side, the remoting infrastructure creates a
proxy
that stands-in as a pseudo-instantiation of the remotable object. It does not implement the functionality of the remotable object, but presents a similar interface. As such, the remoting infrastructure needs to know the public interface of the remotable object beforehand. Any method calls made against the object, including the identity of the method and any parameters passed, are
serialized to a byte stream and transferred over a communication protocol-dependent
Channel
to a recipient proxy object at the server side ("
marshalled"), by writing to the Channel's transport sink.
At the server side, the proxy reads the stream off the sink and makes the call to the remotable object on the behalf of the client. The results are serialized and transferred over the sink to the client, where the proxy reads the result and hands it over to the calling application.
If the remotable object needs to make a callback to a client object for some services, the client application must mark it as remotable and have a remoting runtime host a listener for it.
The server can connect to it over a different Channel, or over the already existent one if the underlying connection supports bidirectional communication.
A channel can be composed of a number of different Channel objects, possibly with different heterogeneous transports. Thus, remoting can also work across systems separated by an interconnection of heterogeneous networks, including the Internet.
Type safety
In computer science, type safety and type soundness are the extent to which a programming language discourages or prevents type errors. Type safety is sometimes alternatively considered to be a property of facilities of a computer language; that ...
is enforced by the
CTS and the .NET Remoting runtime. Remote method calls are inherently synchronous; asynchronous calls can be implemented using threading libraries. Authentication and access control can be implemented for clients by either using custom Channels or by hosting the remotable objects in
IIS and then using the IIS authentication system.
References
External links
*
Migrating from .NET Remoting to WCF
{{Microsoft APIs
Remoting
In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared computer network), which is written as if it were a ...
Microsoft application programming interfaces
Windows communication and services
Remote procedure call
Net