directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: Serialization/deserialization questions
Date Fri, 25 Feb 2011 12:36:14 GMT
On Fri, Feb 25, 2011 at 5:52 PM, Emmanuel Lecharny <elecharny@gmail.com> wrote:
> Hi guys,
>
> I'm reworking all the serializations for the base objects we are
> manipulating. I have a few questions and I'd like to get you opinion.
>
> The base idea is to get rid of all the Externalizable/Serializable
> interfaces, and to provide our own helper classes to serialize the objects
> we have to write down the disk. The rationnal is that we avoid the cost of
> writing the useless java class informations, keeping the written objects as
> small as possible, and the process as fast as possible.
>
> Q1 : Do we have to store a version number into the written data ?
I would say we 'Should' , cause I have seen enough cases where server
fails to start just because a class definition was
slightly changed which is unrelated to the storage format
> Q2 : I'm going to inject the SchemaManager in all the deserialized data (it
> can be null, if the SchemaManager has not been created). Do you think it's a
> problem ?
IMO it is a unnecessary field, we better set the SchemaManager in the
de/serializer class
> Q3 : In order to be able to create the object as it was when it was
> serialized, I'll create package visible only constructors, with all the
> needed parameters. Does it sounds the right approach ?
+1 perfectly valid, construction cost will cheaper in few cases (e.x DN, RDN)
>
> Thanks !
>
> --
> Regards,
> Cordialement,
> Emmanuel L├ęcharny
> www.iktek.com
>
>

thanks Emmanuel

-- 
Kiran Ayyagari

Mime
View raw message