Hubbry Logo
search
logo

Marshalling (computer science)

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
Marshalling (computer science)

In computer science, marshalling or marshaling (US spelling) is the process of transforming the memory representation of an object into a data format suitable for storage or transmission, especially between different runtimes.[citation needed] It is typically used when data must be moved between different parts of a computer program or from one program to another.

Marshalling simplifies complex communications, because it allows using composite objects instead of being restricted to primitive objects.

Marshalling is similar to or synonymous with serialization, although technically serialization is one step in the process of marshalling an object.

Marshalling and serialization might thus be done differently, although some form of serialization is usually used to do marshalling.

The term deserialization is somewhat similar to un-marshalling a dry object "on the server side", i.e., demarshalling (or unmarshalling) to get a live object back: the serialized object is transformed into an internal data structure, i.e., a live object within the target runtime. It usually corresponds to the exact inverse process of marshalling, although sometimes both ends of the process trigger specific business logic.

The accurate definition of marshalling differs across programming languages such as Python, Java, and .NET, and in some contexts, is used interchangeably with serialization.

To "serialize" an object means to convert its state into a byte stream in such a way that the byte stream may be converted back into a copy of the object, which is unmarshalling in essence. Different programming languages either make or don’t make the distinction between the two concepts. A few examples:

In Python, the term "marshal" is used for a specific type of "serialization" in the Python standard library – storing internal python objects:

See all
User Avatar
No comments yet.