On Mon, Oct 10, 2011 at 6:50 PM, Yanni Chiu <[email protected]> wrote:

> On 08/10/11 6:03 PM, Stéphane Ducasse wrote:
>
>> Mariano
>>
>>
>>  No, that's impossible, and if posible, it is not worth it.
>>> Migrating from an old format to a new one is extremelly complicated
>>> and innecessary. The easiest way to solve this is to take the
>>> correct version of Fuel, materialize the graph from the stream,
>>> load new version of Fuel, and seriaize it again. That the easiest,
>>> more secure, and more practical approach I can see.
>>>
>>
>> It would be interesting to see if you can get two different versions
>> in memory :) (a need for a module system) so that you can load with
>> one and save with the other.
>>
>
> For the case where a lot of serialized files need to be converted, having
> two versions in memory is almost a necessity;


heheheheh how people could live with ReferenceStream for 10 years?


> otherwise, the Fuel code update would have to be applied for each file
> being converted.
>
>
but answer my question: why would you need to update Fuel so frequently ?


> A separate issue is that at some point I wanted to serialize something
> differently, in two different contexts. In one case, serializing a Pier
> kernel, I want Fuel to just do its thing. In the other case, when exporting
> a portion a Pier kernel, I want to fine tune (i.e. map to different objects)
> the objects being exported/imported. There is a hook to allow the object
> swap, but the swap would then take place for the other case of serializing
> to whole kernel (where the desired behaviour was for no such mapping).
>

That's an interesting point....Let me see if I understood. Let's say that
you want to exclude certain instance variables of a class. What you mean is
that you want to apply this hook (or another one) in an specific
serialization and not always? because right now with Fuel (and SIXX, and I
guess StOMP also) since you put the hooks in methods of the class, they are
always taken into account. How would the API for the user should be?  you
can you specify for an specific serialization run that certain hook of
certain object/class must be applied and some should not ?

Apart from that, do you have a real example where you need such behavior ?
Beause it looks quite complex/rare scenario ;)

Thanks guys for the nice thread.


>
> --
> Yanni
>
>
>


-- 
Mariano
http://marianopeck.wordpress.com

Reply via email to