From: Robert Ramey (ramey_at_[hidden])
Date: 2003-11-07 13:55:12
JOLY Loic wrote:
>I plan to use serialisation, but not to save data in a file, but to send
>it over the network. I wonder wether the serialisation library draft
>would be relevent to my case.
I believe there would be no problem: You can use the included archives
without change if you specify a string stream rather than a file stream
as is most common. I have already seen people do this.
>Among the requirements described in the overview, there are some for
>which I do not care, and other not written that I am not sure are
>totally adressed by the library.
which ones do you not think are totally addressed by the library?
>I do not care (and do not want to pay) for 3 and 5 (versionning and
>handling of shared data).
>What I need is self-contained data. For instance, when I send an object
>on the network, I do not want any globally shared table of object
>references, or class definition, to be generated.
Default is versioning enable and tracking of object serialized through
pointers. These can be changed on a class by class basis.
No global tables are maintained. All tables are part of the
archive instance which typically is destroyed as soon as the
data is serialized. For versioning and tracking turned off - not
even these temporary tables are generated.
>I believe that the object_serializable implementation level could help
>me in that respect, but would like to specify it not at the class level,
>but at the archive level. That way, I am sure all classes sent to my
>archive behave correctly. Is this possible ?
Honestly it never crossed my mind that someone would want to do this.
A stated goal of the system is that once serialization works with one
archive it works the same with all archives. So this was never considered.
Since you have to specify a serialize function for each class - I wouldn't
think there there would be much of an issue with specifying two more lines
per class header to specify the desired serialization traits - it would also document
your implementation. It would also make it easier to debug as you might
want to direct it to a text or xml file to check it but use a binary stream
for the production application.
>Do you think I could use serialisation to achieve my goals ? Do you
>think there is another point I forgot ?
Our intention is that it support this kind of application. You'll just have try it.
As you are breaking new ground here, It could well be that something has been
overlooked. I would recommend making a small simple example to prove the
concept. If this is not easy, we would be very interested in hearing about it.
It would flush out an questions, bugs, documentation failings etc.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk