What is .NET Remoting?

 
Chapter 21 - Distributed Applications with .NET Remoting
bySimon Robinsonet al.
Wrox Press 2002
  

In DCOM. With DCOM, we are used to calling methods on objects running on a server. The programming model is the same whether objects are used on the server or on the client.

Without DCOM, we have to deal with ports and sockets, pay attention to the target platforms because of possibly different data representations, and build a custom protocol, where messages are sent to the socket so that we finally call some methods. DCOM handles all these issues for us.

The replacement for DCOM is .NET Remoting . In contrast to DCOM, .NET Remoting can also be used in Internet solutions. DCOM is not flexible and efficient enough for use in Internet solutions. It's possible to adapt and extend every part of the architecture with .NET Remoting, so it fits for nearly all remoting scenarios.

Two expressions can describe .NET Remoting: Web Services Anywhere and CLR Object Remoting . Let's have a closer look at what these two phrases mean.

Web Services Anywhere

The expression Web Services Anywhere is used with .NET Remoting. It means that with .NET Remoting, web services can be used in any application over any transport , using any payload encoding . .NET Remoting is an extremely flexible architecture.

Using SOAP and HTTP together is just one way to call remote objects. The transport channel is pluggable, and can be replaced . We get HTTP and TCP channels represented by the classes HttpChannel and TcpChannel . We can build transport channels to use UDP, IPX, SMTP, a shared memory mechanism, or message queuing - the choice is yours entirely.

The term pluggable is often used with .NET Remoting. Pluggable means that a specific part is designed so that it can be replaced by a custom implementation.

The payload is used to transport the parameters of a method call. This payload encoding can also be replaced. Microsoft delivers SOAP and binary encoding mechanisms. We can use the SOAP formatter using the HTTP channel, but it's also possible to use HTTP using the binary formatter. Of course, both of these formatters can also be used with the TCP channel.

.NET Remoting not only makes it possible to use web services in every .NET application, but also allows us to offer web services in every application. It doesn't matter if we build a console or a Windows application, a Windows Service, or a COM+ component - web services can be used anywhere!

CLR Object Remoting

CLR Object Remoting sits on top of web services anywhere. CLR Object Remoting makes it easy to use web services. All of the language constructs, such as constructors, delegates, interfaces, methods, properties, and fields, can be used with remote objects. Calling a remote object can be as easy as calling a local object. CLR Object Remoting deals with activation, distributed identities, lifetimes, and call contexts.

  


Professional C#. 2nd Edition
Performance Consulting: A Practical Guide for HR and Learning Professionals
ISBN: 1576754359
EAN: 2147483647
Year: 2002
Pages: 244

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net