Marshalling (computer science)

Marshalling (computer science)

In computer science, marshalling (sometimes spelled marshaling, similar to serialization) is the process of transforming the memory representation of an object to a data format suitable for storage or transmission. It is typically used when data must be moved between different parts of a computer program or from one program to another.

Marshalling is a process that is used to communicate to remote objects with an object (in this case a serialized object). It simplifies complex communication, using custom/complex objects to communicate - instead of primitives.

The opposite, or reverse, of marshalling is called unmarshalling (or demarshalling, similar to deserialization).

Contents

Usage

Marshalling is used within implementations of different RPC mechanisms, where it is necessary for transporting data between processes and/or between threads. In Microsoft's COM, interface pointers must be marshalled when crossing COM apartment boundaries[1]. In the .NET Framework, the conversion between an unmanaged type and a CLR type, as in the P/Invoke process, is also an example of an action that requires marshalling to take place[2].

Additionally, marshalling is used extensively within scripts and applications that utilize the XPCOM technologies provided within the Mozilla Application Framework. The Mozilla Firefox browser is a popular application built with this framework that additionally allows scripting languages to utilize XPCOM through Cross-Platform Connect (XPConnect).

Comparison with serialization

The term "marshal" is considered to be synonymous with "serialize" in the Python standard library[3], but the terms are not synonymous in the Java-related RFC 2713:

To "marshal" an object means to record its state and codebase(s) in such a way that when the marshalled object is "unmarshalled", a copy of the original object is obtained, possibly by automatically loading the class definitions of the object. You can marshal any object that is serializable or remote. Marshalling is like serialization, except marshalling also records codebases. Marshalling is different from serialization in that marshalling treats remote objects specially. (RFC 2713)

To "serialize" an object means to convert its state into a byte stream in such a way that the byte stream can be converted back into a copy of the object. The marshalling will be of more advantage.

References

  1. ^ Apartments and COM Threading Models
  2. ^ Interop Marshaling Overview
  3. ^ Marshal Python module

See also


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Marshalling — may refer to : Marshalling (heraldry) Marshalling (computer science) Aircraft marshalling A marshalling yard in railroading Doctrine of Marshalling an equitable concept in the law [1] …   Wikipedia

  • PLM College of Science — Infobox University name = Pamantasan ng Lungsod ng Maynila College of Science established = 2003 type = Public city = flagicon|Philippines Intramuros state = Manila country = Philippines dean = Prof. Corazon S. Bumanglag faculty = undergrad =… …   Wikipedia

  • Marshall — may refer to: Marshall , a British/Commonwealth spelling for the military rank of marshal Marshall (name) Marshall Aerospace, an aerospace contractor based in Cambridge, England Marshall Amplification, a brand of guitar amplifier Marshall Bus, an …   Wikipedia

  • Marshal (disambiguation) — A marshal is a holder of various military, law enforcement and other positions. Demonstration marshal, prevents individuals from infiltrating and fostering violence in demonstrations Field marshal, a top army officer rank used by armies of… …   Wikipedia

  • Gat Andrés Bonifacio University — This article is not about the University of Manila. Infobox University name = Gat Andrés Bonifacio University Pamantasang Gat Andres Bonifacio motto = Public service through quality education established = 1995 type = Public, City University… …   Wikipedia

  • Component Object Model — Not to be confused with COM file. Component Object Model (COM) is a binary interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range… …   Wikipedia

  • Universidad De Manila — Not to be confused with University of Manila or University of the City of Manila. Universidad De Manila Motto Public service through quality education Established 1995 Type …   Wikipedia

  • Component-based software engineering — A simple example of two components expressed in UML 2.0. The checkout component, responsible for facilitating the customer s order, requires the card processing component to charge the customer s credit/debit card (functionality that the latter… …   Wikipedia

  • Serialization — This article is about data structure encoding. For other uses, see Serialization (disambiguation). In computer science, in the context of data storage and transmission, serialization is the process of converting a data structure or object state… …   Wikipedia

  • Comparison of programming paradigms — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computin …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”