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

Full time contractual programming position, Full time contractual programmi...

Full time contractual programming position (mostly scraping, databasing) Project Description: This is a full time contractual role needed for a sports advisory service. We ar

Deployment diagram, Explain all parts of a deployment diagram. Pa...

Explain all parts of a deployment diagram. Package: - The package logically groups element of a UML model. Node: - The Node is as physical system which represents a

What are attributes, What are Attributes?  Attributes are declarative t...

What are Attributes?  Attributes are declarative tags in code that insert additional metadata into an assembly. There exist two types of attributes in the .NET Framework: Prede

Difference between asp and asp.net, The ASP.NET new feature supports are sh...

The ASP.NET new feature supports are shown below :- Better Language Support 1) The New ADO.NET Concepts have been implemented. 2) The ASP.NET supports complete  language

Targin protocol and stock market protocol, Project Description: We need ...

Project Description: We need to construct services in C# or VB.NET that can manipulate with a Targin TIP Protocol Server (protocol for financial information exchange), receive d

Candidate key, What is a candidate key? A table may have more than one ...

What is a candidate key? A table may have more than one combination of columns that could uniquely identify the rows in a table; every combination is a candidate key. During th

Iuknown interface, Describe IUKNOWN interface All COM object supports a...

Describe IUKNOWN interface All COM object supports atleast one interface, that is  IUnknown interface. All interfaces are the classes, derived from the base class IUnknown. Eve

Scavenging, What is scavenging? When server running your ASP.NET applic...

What is scavenging? When server running your ASP.NET application runs low on the memory resources, items are discarded from the cache depending on cache item priority. The Cach

Use of resource manager class, What's the use of resource manager class? ...

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

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