Hi Eric, On Thu, Nov 5, 2009 at 1:14 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? > This sounds like a very useful feature. Most users would like to use a tool like diff to compare different versions of the Synapse configuration. Implementing this feature would hence improve the configuration management aspects of Synapse in a great deal. So here's my +1 for the proposed changes. Please raise a JIRA issue for this as well. Thanks, Hiranya > > 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 > -- Hiranya Jayathilaka Software Engineer; WSO2 Inc.; http://wso2.org E-mail: [email protected]; Mobile: +94 77 633 3491 Blog: http://techfeast-hiranya.blogspot.com
