Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-12-06 22:13:33


From: "Jeff Garland" <jeff_at_[hidden]>
> > > > * 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.

I agree, but only if the cost of multiple targets is very low.
I've got a relational btree system that uses a design like the
one Michael uses. The btree itself traffics only in delta-
compressed strings of lexicograchically-ordered unsigned bytes,
and the serialization layer translates C++ data structures into
such strings. Crucial to this system's performance is the fact
that the serialization->compression->insertion operations are
inlined together and do no unnecessary copies, the search
operations operate directly on the compressed byte strings, and
the decompression->deserialization operations are also inlined
and do minimal copying. I'd love to port this system from it's
original C coding into something Boostable.

> > 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
>
>
> Info: http://www.boost.org Send unsubscribe requests to: <mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


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