Showing posts with label What is Marshalling?. Show all posts
Showing posts with label What is Marshalling?. Show all posts

Monday, June 23, 2014

What is Marshalling?

Marshaling is a process of making an object in one process (the server) available to another process (the client). There are two ways to achieve the marshalling.
i. Marshal by value: the server creates a copy of the object passes the copy to the client. When a client makes a call to an object marshaled by value (MBV), the server creates an exact copy and sends that copy to the client. The client can then use the object's data and executable functionality directly within its own process or application domain without making additional calls to the server. Objects that the application accesses frequently are best remoted using MBV.
ii. Marshal by reference: the client creates a proxy for the object and then uses the proxy to access the object. When a client makes a call to an object marshaled by reference (MBR), the .NET framework creates a proxy in the client's application domain and the client uses that proxy to access the original object on the server. Large objects that the application accesses relatively infrequently are good candidates for MBR.