
Building Distributed Applications Efficiently Using .Net RemotingEver since the internet revolution started, it has become indispensable for the enterprise applications to communicate across the network to get information and service from different sources. Today, this communication is leveraged in many of the enterprise applications ranging from business to business (B2B) and Business to Consumer (B2C) categories. Further, it has become a key driver for building efficient distributed applications across platforms addressing complex business needs without rebuilding all of the components.
Building
distributed applications efficiently implies the fact that their design
will take care of the factors like performance, robustness, flexibility,
maintainability, re-usability and scalability of components. .Net remoting
provides a good architectural framework to develop distributed application
taking into consideration of these factors. .Net remoting
is based on the principles of SOA (Service Oriented Architecture) where
it is not necessary for a client application to know about the implementation
details of the service in the server, thus achieving a transparent way
of inter-process communication. Also, any change in the server does not
necessitate a corresponding change to the client. .Net Remoting was provided
by Microsoft Corporation as a replacement for DCOM (Distributed Component
Object Model) since DCOM was not able to support internet solutions. The .Net
framework provides an option to customize different stages of communication
between the client and the remote object in the server to suit to different
remoting scenarios. For example, a channel used for communication between
the client and server is pluggable and replaceable with either TCP or
HTTP or any custom channel based on the requirement. Also, the rich class
library provided by the framework helps to quickly create and use a remote
object and the required web service. All the configurations for the communication
with the remote object are based on XML files, instead of the registry-based
settings in DCOM. Typically,
in a web service, the object state on the server is not maintained since
the transport protocol is based on HTTP. However, .Net Remoting provides
the developer an option to maintain state or not by choosing the required
activation model for the remote object such as Client activated or Server
activated model. This is due to the fact that every remote object has
a distributed identity, with the state being either Singleton or SingleCall
type. If a remote
object is created in Singleton mode, there will be one instance of the
object servicing all the clients that access it and that object maintains
its state by itself. In case of SingleCall type, there will be a new instance
of object created for every call from the client and no state maintained
anywhere. Remoting also provides a facility to allow the remote object
on server to call the asynchronous methods on the client, performing callbacks
using the 'delegate' and 'event' keyword and hence achieves two-way communication. Concept
of .Net Remoting .Net remoting
uses the concept of Application Domain - a boundary within which multiple
applications run in the same process without affecting each other. Error
thrown in one application domain will not affect the other application
domain in the same process. The client
in one Application Domain uses a proxy to call the remote object in the
server in another Application Domain of another process. Messages from
one client are serialized using a formatter and sent to the client channel.
The server channel on the server deserializes the message using its formatter
and calls the remote object to service the client. Typically,
remoting expects both the client and the server environment to run Common
Language Runtime (CLR) and hence does not support heterogeneous environment
directly. To use it in a heterogeneous environment, it provides another
alternative option of using Web Services through HTTP. This causes a slight
overhead in development time and transaction speed. Also, there is no
in-built security mechanism within the remoting framework and hence care
needs to be taken while developing secured applications. However,
the above limitation out-weighs the benefits derived from the .Net Remoting
framework. A right use of .Net Remoting features can provide maximum benefit
to enterprise applications addressing todays business needs.
_______________________________________________________________________
FREE
Subscription
Subscribe
to our mailing list and receive new articles Note
: We never rent, trade, or sell my email lists to Visit
.NET Programming Tutorial Homepage ______________________________________________________ |