Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2001-12-06 21:00:32


> --- In boost_at_y..., "Jeff Garland" <jeff_at_c...> wrote:
> >
> > > * Supports a format which collates in the same order that the
> > > objects collate.
> >
> > That's fine for a file-based serialization, but the framework
> > should not make this assumption or it will be unusable for
> > non-stream based formats such as databases. The point of a
> > serialization framework is usually to support multiple targets
> > without impact to the application or domain objects.
>
> Not sure that I understand what's wrong with the serialized form
> always collating in the same order that the objects do, w/r/t
> "databases." (Ped, the library that I wrote which satisfies this
> requirement, adapts the Berkeley DB; do you mean SQL databases?)
>
> Anyhow, can you restate this as something that is a requirement for
> you, rather than something that isn't?

Let me try to explain with an example. Suppose I have an object with 3 fields
A, B, and C. In a stream-based serialization the data may always be stream as
A->B->C. However, databases are random access. Thus we might have the columns
ordered in the database table as B->A->C. Thus it is not desirable to assume
that the order of retrieval from the medium will be the same as the order of
serialization.

> "Supports mutiple serialization 'genres' (eg ASCII vs. 'binary')"
> perhaps?
>
> That's probably a good idea, though I'm uncertain that I've properly
> understood you.

I'm not sure I understood either :-)

Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk