synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubert, Eric" <>
Subject Constant/reproducable order of elements in synapse.xml
Date Thu, 05 Nov 2009 07:44:40 GMT
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:

   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?

View raw message