Marshalling and types of marshalling, DOT NET Programming

What is marshalling and types of marshalling?

The Marshaling is used when an object is converted so that it can be sent across the network or across the application domains. The Unmarshaling generates an object from the marshaled data. There are 2 ways to do the marshalling:-

1) Marshal-by-value (MBV) :- In this type of marshalling the object is serialized into the channel, and a copy of the object is generated on the other side of the network. The object which is to marshal is stored into the stream, and the stream is used to build a copy of the object on the another side with the unmarshalling sequence.

2) Marshaling-by-reference (MBR):- Here it creates a proxy on the client which  is used to communicate with the remote object. The marshaling sequence of a remote object creates an ObjRef instance which itself can be serialized across the network.

The Objects that are derived from "MarshalByRefObject" are always marshaled by the reference.

To marshal a remote object the static method RemotingServices.Marshal() is used.RemotingServices.Marshal() has following overloaded versions:-

public static ObjRef Marshal(MarshalByRefObject obj)

 public static ObjRef Marshal(MarshalByRefObject obj, string objUri)

 public static ObjRef Marshal(MarshalByRefObject obj, string objUri,Type requestedType)

The very First argument obj specifies the object to marshal. The objUri is the path which is stored within the marshaled object reference; it can be used to access the remote object. The requestedType is used to pass a different type of the object to the object reference. This is very useful if the client using the remote object shouldn't use the object class but an interface that the remote object class implements instead. In this scenario the interface is the requestedType which must be used for the marshaling.

Posted Date: 9/21/2012 8:26:22 AM | Location : United States







Related Discussions:- Marshalling and types of marshalling, Assignment Help, Ask Question on Marshalling and types of marshalling, Get Answer, Expert's Help, Marshalling and types of marshalling Discussions

Write discussion on Marshalling and types of marshalling
Your posts are moderated
Related Questions
Create page website to catalog some of the music: A homepage:  that automatically comes up when you go to 127.0.0.1:3000 (instead of the default Ruby-on-Rails pa

The program is broke now but explains in text and printscreens the specific things i have to do to implement new bookies new sports and change settings for looking for arbs on two

Could you please explain to me the different types of DOT NET programming

I need a Custom Report - Crystal Reports Project Description: I am seeking a custom report for our syrinx hire software, all reports are made from Crystal Reports. Skills

Video wall control app for Ipad and Win7-64 Project Description: We would like a completely functioning PC and IPAD app to control the functions of a videowall processor.

What is UDDI? The Full form of the UDDI is Universal Description, Discovery and Integration. The directory that can be used to publish and discover public Web Services. If you

What's the use of resource manager class? The ResourceManager class helps us to read the resource files and get the values by using key. At First you require to create the obje

I have to develop a Google Map Fix .NET Site on Android(maybe Cross Browser issue) Project Description: A developer has implemented a characteristic which involves data from

I have a application on web i am getting some issue please make changes and help me out ..please help me Skills required: .NET, MySQL, PHP, ASP, Visual Basic

Needed Expert Ruby in Rail Deveoloper - urgent Project Description: I require an expert Ruby on Rail developer. Need someone who has depth in knowledge of Ruby on Rail. Wi