Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-12-09 11:13:53


At 05:15 AM 12/7/2001, Asger Alstrup Nielsen wrote:

>In addition to persistence2 by Jens Mauer,

Note that Jens' persistence work has been checked into CVS under the branch
"persistence-initial" since last winter. Jens and I were planning to
polish it enough to submit for formal review, but got distracted and never
carried through with the work.

> you should take a look at XTL
>by José Orlando Pereira:
>
>http://xtl.sourceforge.net/
>
>In addition to the version on the homepage, José has developed a beta of
>a new generation of XTL which is very promising. Unfortunately, he did
>not put that on the home-page, so I suppose you have to ask for it.
>Maybe José will put it on the home page one day.
>
>> I take the relative silence to mean that either no one has an interest
>> or everyone's needs are more or less met by the reader/writer
>> templates (and general programming pattern) in Ped. I'm banking on
>> the former.
>
>This topic has been discussed a number of times on this list. As a
>result of these discussions, both persistence and XTL have been
>improved. At first persistence1 did not have a unified approach to the
>reader and writer code, but this was changed after inspiration from XTL.
>Also, it was discussed that persistence should separate the concepts of
>format and medium, just like XTL does. I'm not sure if persistence2 does
>this at the current point.

boost::persistence reader and writer templates (which deal with format)
take Readable and Writable parameters respectively, and these supply the
"medium" if I understand you correctly. The Readable and Writable
requirements are minimal, so it should be possible and easy to meet them
with a variety of I/O connections, including files, networks, databases,
etc.

>Similarly, the beta version of XTL 2 has a direct result of some of the
>discussion on the boost list. It was developed to use a more powerful
>and extendible system that also holds the promise to also support tagged
>formats, such as XML. Personally, I think it has developed to be become
>even better than early. Unforunately, nobody gave José the feedback to
>bring things forward, and things kind of stopped there.

The CVS branch contains a header <boost/persistence/html.hpp> which
supplies an HTML writer, as a demonstration of a tagged format. An HTML
reader is yet to be supplied.

It seems to me there were also outstanding issues with the XDR
reader/writer. RFC 1832 doesn't specify some aspects of floating point
representation, maybe. Jens?

>If I should compare persistence2 and XTL2, the difference comes from a
>different agenda: It seems persistence2 is meant as a relatively simple
>and easy-to-use system which can cover the most basic needs for
>serialization, and only that. It is intentionally not intended to be a
>system that can be used to solve all serialization needs. I suppose this
>comes from a wish to make it easy to use and understand for the user.

Also a desire to avoid undefined behavior, avoid non-portable code, and
control data portability (making data portable or non-portable as desired).

>On the other hand, XTL is as easy-to-use, but it is intended to be as
>complete a system as possible. Therefore, the implementation may be more
>difficult to understand, although I think it's not much more so. The
>design is open-ended in most aspects, and the framework can solve most
>serialization needs.
>
>Personally, I'd prefer XTL2 to be developed further, since it holds the
>most promise to me.

I haven't looked at XTL2, so don't really know which I would prefer. Jens'
persistence framework is an elegant design, but my memory of XTL is that it
was also a strong design.

What Boost really needs is for someone to take persistence in hand and
polish it enough to submit for formal review. If the XTL developers feel
their design is seriously better, they should speak up, too!

--Beman


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