|
When
objects in memory are to be passed across a network to another
host or persisted to storage, their in-memory representation must
be converted to a suitable out-of-memory format. This process
is called marshalling, and converting back to an in memory representation
is called demarshalling.
In marshalling, several things must occur. Objects must be respresented
with enough information that the destination host can understand
the type of object being created. The objects’ state data
must be converted to the appropriate format. Complex object trees
that refer to each other via object references (or pointers) need
to refer to each other via some form of ID that is independent
of any memory model.
During demarshalling, the destination host must reverse all that
and must also validate that the objects it receives are consistent
with the expected object type (i.e. it validate that it doesn’t
get a string where it expects a number).
|
In web services,
objects are typically marshalled by converting them to an XML
representation according to a standard such as SOAP.
Objects can also be serialzed into a binary format, which in turn
can be wrapped in a SOAP header. However, such formats run the
risk of being too proprietary or platform specific to be useful
for all potential clients.
See also: Object Serialization
/ Deserialization |