Hi Eric

My + 1 for using sorted collection implementations, if it enables to
serialize synapse XML in a consistent order.

I also prefer to encapsulate all extensible points throughout the code
base using a single consistent way ... may be factory mechanism.

Thanks
Indika

On Thu, Nov 5, 2009 at 1:44 PM, Hubert, Eric <[email protected]> wrote:
> Hi devs,
>
> Currently the implementation of the Synapse configuration model uses 
> unordered collections to store the different configuration items (like proxy 
> services etc.).
>
> Thus serialization creates fixed order of main elements, but changing order 
> of items within main elements. Diffing of XML-files created based on built-in 
> serialization to track changes on this level is almost impossible.
>
> Would somebody object to using sorted collection implementations instead?
>
> Background: We are currently using a custom mechanism to create a synapse XML 
> Configuration file. This mechanism actually guarantees a consistent order of 
> the whole configuration file. Changes to the model can also be verified on 
> the persisted model (synapse.xml). This turned out to be very handy.
>
> For a couple of reasons I was now investigating whether it would make sense 
> to rather just write a custom builder to create a synapse configuration from 
> our specific configuration store and than use Synapse built-in support for 
> serialization to XML:
>
> XMLConfigurationSerializer.serializeConfiguration(synapseConfiguration,
>   new FileOutputStream(synapseConfigFileName));
>
> This way I should be able to get rid of a bunch of code while increasing 
> flexibility. To make this work at least the issue reported yesterday as well 
> as the ordering problem would need to be resolved.
>
> Later on if there would be a way to configure/set the configuration builder 
> to use (e.g. via a factory mechanism), one could have the possibility to run 
> directly based on the external (versioned) config store without using the 
> intermediate step of synapse.xml.
>
> Any thoughts on this?
>
>
> Regards,
>  Eric
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to