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

Development of online game, Project Description: Online game development...

Project Description: Online game development 1. Online Live Baccarat Game is required - server program(IOCP or ect..). - 2D graphic design. - client program. - we

How can you add rows from the datatable object of dataset, How can you add ...

How can you add or remove rows from the DataTable object of DataSet? The DataRowCollection class explains the collection of rows for the DataTable object in a DataSet. The Data

Need help in crm and shaerpoint, CRM and Shaerpoint We are using 365+ CR...

CRM and Shaerpoint We are using 365+ CRM in the cloud for QuattroCitta at the moment which we will migrate to our own private cloud in six months (project part 2). Within ShareP

Creation of a dynamic corporate web site, wiConstellation WEB site Proje...

wiConstellation WEB site Project Description: Creation of a dynamic corporate WEB site with administration panel, requirement collaboration, product definition, Q&A, user man

Why does an organization need to manage the workloads, Why does an organiza...

Why does an organization need to manage the workloads? The workload can be explained as an independent service or a set of code that can be implemented. It can be everything f

Add in bitcoin payment option in website, Add in bitcoin payment option in ...

Add in bitcoin payment option in website Project Description: Include bitcoin files to magento for payment options on website. It is just including the files to the magent

Explain expandoobject and dynamicobject classes, Explain ExpandoObject and ...

Explain ExpandoObject and DynamicObject classes. The ExpandoObject class refers to a class whose members can be explicitly added and removed at runtime. In other words, the Exp

Name the binders provided by .net framework 4.0, Name the binders provided ...

Name the binders provided by .NET Framework 4.0. .NET Framework 4.0 provides the following binders: Object Binder - Enables to communicate with .NET objects. JavaScrip

I need cloudflare api interface to c#, I need CloudFlare API interface to C...

I need CloudFlare API interface to C# Project Description: We require a small piece of C# .NET code, integrated in an object, that will interface with CloudFlare's API and ge

Dataset object, What is Dataset object ? The DataSet gives the basis fo...

What is Dataset object ? The DataSet gives the basis for the disconnected storage and manipulation of the relational data. We fill it from the  data store, work with it while d

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