-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Nasha
Message 1 in Discussion

 
Hi Frndz, 
Today we will be discuss .NET Remoting. Let us start of with its Introduction :-

Introduction :

Remoting is used to access objects in the same and another application domains. 
When the client accesses an object in another  app domain the client receives a 
proxy to the real object. Hence when the client calls any method of the remote 
object it actually calls  a method on the proxy. Proxy is has a similar 
interface to the real object. The proxy in turn sends a message to the message 
sink.  The message sink further sends the message to the channel. Channel is 
responsible for connecting the client and the server. Client  Side sends data 
to the server side channel. The server side channel in turn talks with the 
server side message sinks. There can be  one or more message sinks. The last 
message sink calls method on the remote object. The result is sent using the 
same approach.

Classes and Remoting:

There are two main types of objects that play a very important role in remoting 
Marshal by value and Marshal by ref.

Marshal by value:
        Objects of type marhsal by value are not bound to any application 
domain. They can be serialized and passed across  through channels. To 
serialize these objects it is necessary that there class implements 
ISerializable interface or are marked with the  [Serializable] attribute.

Marshal by ref:
        Classes of type marshal by ref are derived from a class known as 
MarshalByRefObject. Any object of type  MarshalByRefObject is never passed 
across application domains. Hence one needs a proxy to access these objects 
from another  application domain. Unlike the classes which are of type Marshal 
by value which are not bound to there application domain Marshal  by ref 
classes are bound to there application domain. Objects of these classes are 
also called ContextBound objects as they are only  valid in the creation 
context.
       
        Classes that cannot be serialized and not derived from 
MarshalByRefObject are non-remotable objects
       
Context:
        We all know that a single application process can have multiple 
application domains. An application can have multiple  contexts. A Context 
groups object as per there execution  requirement. Hence Marshal by ref objects 
are context bound in there  application domain coz thereexecution requirement 
is defined in there application domain. Thus a proxy is used to make a call to  
these objects so that call is executed in the same app domain or context.
        Creating an application domain creates a default context for that 
application domain.An context also defines certain context  properties which is 
required by objects created in it. 
-- Please post your queries and comments for my articles in the user group for 
the benefit of all. I hope this step from my end is helpful to all of us. You 
can find all articles written by me at my personal blog 
http://spaces.msn.com/members/nasha. 

Regards,

Namratha (Nasha)

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to