Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-12-12 18:16:36

Yitzhak Sapir <yitzhaks_at_[hidden]> writes:

> I would like to offer the following definition (based on the previous
> definition given by Augustus Saunders):
> Serialization is the process of breaking up various application-defined
> containers of data into their components and serializing each component
> one by one into a stream, in an agreed-upon intermediate exchange format
> that enables an appropriate parser to reconstruct ("deserialize")
> necessary information by reading the stream. The containers may contain
> components of (1) a fixed quantity and type (arrays/bit arrays and
> integral types), (2) varying quantity and fixed type (lists/vectors), (3)
> fixed quantity and varying types (structs and classes), or (4) unit
> quantity and discriminated type (unions). Each component of the container
> may be a container in itself, which is why the definition is necessarily
> recursive. Necessary information is defined by the needs of the parser.
> Because it is not presumed that the parser (which may be a human being)
> shares apriori knowledge, it may be necessary to include meta-data
> regarding data types. Various structuring mechanisms may be used in the ,
> coming in various flavours--header, pre/post tags, post (ie,terminated),
> length prepended, packeted, etc. Metadata may be independent or mixed with
> structure.
> I disagree that serialization is by necessity lossy, or that serialization
> by necessity performs transformations and persistence does not.
> Persistence may perform non-lossy transformation. If the data is to
> persist in a file, pointers may have to be appropriately transformed.
> (Maybe I don't understand the meaning of transformation in the given
> paragraph). Serialization may perform lossy transformations, or it may
> not. It may be symmetric, or it may not. But serialization always
> involves data fed serially into a stream. (A stream being defined as a
> medium that maintains serial data). Serialization always involves a
> format in which that serial data represents the original data. And
> serialization is the process of connecting between the data (and maybe
> metadata) itself, the format, and the stream.

Nice definition of serialization. What's your definition of

Before you answer, maybe we should consider that serialization and
persistence are in different domains. Serialization might be
describing a process, while persistence might be describing a property
of a system or data structure. If that's the case, maybe we shouldn't
be trying to talk about the differences.

                       David Abrahams
   dave_at_[hidden] *
Boost support, enhancements, training, and commercial distribution

Boost list run by bdawes at, gregod at, cpdaniel at, john at