Boost logo

Boost :

From: prez_at_[hidden]
Date: 2006-03-31 16:59:18


Hey,

I want to use serialization for some kind of active replication,
however the biggest barrier to this is the fact that serialization
does not allow me to put the same object into the stream twice. To
be more precise, I want to be able to serialize both to a network and
to disk, and I very much like the elegance of the serialization
approach (plus the fact it can re-create pointer references, arrays,
and such).

So my questions are:
a) How difficult would it be to be able to allow an object to be
serialized twice, where the second copy would more or less do an
operator= (instead of creating a new object) on the first copy on
deserialization.
b) How difficult would it be to have more or less an 'appending'
serialization stream - ie. I deserialize what I have previously stored
on disk, and then continue to append to the serialization stream (which
appends to the file from then on), making my serialization more or less
unbounded.
c) Is there currently an unbounded serialization stream? I mean,
obviously the XML stream will not be 'complete' until you close the
serialization stream and it can append any close tags it needs to,
however if I wanted to continually write to a stream throughout the
time my program is running, and if it crashes, be able to use that to
get back to the state I was in, is it possible?

I realize that in some respects this is kind of hammering a square peg
into a round hole, since serialization seems to have been designed for
'one-short rights', but serialization and replication type
functionality is very similar in nature.

-- 
PreZ :)
Death is life's way of telling you you've been fired.
		-- R. Geis

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