Marshalling and types of marshalling, DOT NET Programming

Assignment Help:

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.


Related Discussions:- Marshalling and types of marshalling

Explain windows authentication schemes, Explain Windows authentication Sche...

Explain Windows authentication Schemes There are four parts of windows authentication I. Integrated Windows authentication II. Basic and basic with SSL authentication

What is delegation, What is Delegation? A delegate seems like a strongl...

What is Delegation? A delegate seems like a strongly type function pointer. Delegates can request the methods that they reference without making explicit calls to those methods

What is a link, What is a Link? At the lowest level, a network can have...

What is a Link? At the lowest level, a network can have of two or more computers directly linked by some physical medium such as coaxial cable or optical fiber. Such a physical

Program of custom console output - c# program, Program of Custom Console Ou...

Program of Custom Console Output - C# Program Hello guys i need your advice. How can i implement the custom console output in my project. Please recommend some examples.

What is difference between system.string, What is difference between System...

What is difference between System.String and System.StringBuilder classes? String and StringBuilder classes are used to store string values but the dissimilarity in them is tha

Wds and mdt deployment server training, WDS and MDT Deployment Server Train...

WDS and MDT Deployment Server Training Project Description: I'm seeking someone who can Teach/Train me with MDT and WDS server. This Can be online teaching courses. I will

Various types of transactions in com + .net, Types of Transactions in COM +...

Types of Transactions in COM + .NET There are 5 types of transactions that can be used with COM+.   An object is whenever registered with the COM+ it has to abide either to any

Generate function create signed body, The only difference is that I need th...

The only difference is that I need the most new version. Things have changed a little since then (the key has), so I need this done freshly. I require the result in C#, sourceco

Thread.join() in threading, What is Thread.Join() in threading? There a...

What is Thread.Join() in threading? There are 2 versions of Thread.Join :- Thread.join(). Thread.join(Integer) this returns a Boolean value. The Thread.Join

Application that tracks production costuming, The costumer is an applicatio...

The costumer is an application that tracks production costuming, structure and other related pieces. We discussed this in detail and you have commentary and video to define the pro

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd