Hi Jason, On 9/11/07, WALTON Jason <[EMAIL PROTECTED]> wrote: > > I'm looking to dynamically change the configuration of Synapse while it > is running > > How exactly are you planning to do this? Could you elaborate on the > proposed approach? > > > An excellent question! :) I have yet to decide on the mechanism, but > likely something similar to WSO2, with a set of web services which allow one > or more administrators to make changes to the configuration on the fly. > > Alternatively, updating the current "registry" based system so that all > elements, including Proxies, can be modified. >
No. Current implementation does not allow you to get proxy services from the registry. Also if you read my comment on the SYNAPSE-125 carefully, you will understand that the full configuration can not be made dynamic by putting it in to the registry. (At least for the moment) I understand, from https://issues.apache.org/jira/browse/SYNAPSE-125, > that the current implementation would try to rebuild the entire > configuration, > No. We do not support the full configuration to be dynamic (when you specify it in the registry it is static, i.e one time load), please read the comment on the SYNAPSE-125 carefully. and I haven't dug into the code at all, but perhaps this could be modified > such that the registry reads in elements and "synchronizes" the > configuration with the registry, instead of rebuilding from scratch. > This looks a good approach when we are going to support this. However, digging into the implementation, I see no indication of any form of > thread synchronization in SynapseConfiguration, nor anywhere it is > referenced. This seems to imply that changing the configuration while > running would not be thread safe. Am I missing the synchronization > mechanism? > > Right now we have a single user model for administration from that > implementation. We will address any such issue soon as we integrate with > user management functionality in the near future > > Right, so only one administrator can edit the configuration at a time; but > if we have a single configuration object shared system wide, then while one > administrator is making changes to the configuration, the Synapse mediators > could be trying to read from that configuration at the same time. If the > administrator is adding a new proxy, for example, this involves adding the > Proxy to a HashMap in the SynapseConfiguration, which is not thread safe, > because a mediator could be trying to read from that same HashMap while it > is being modified, with undefined results. I was expecting to find a > ReadWriteLock here, or to see the SynapseConfiguration object which is > shared be marked "volatile" and have it cloned/modified/replaced every time > a modification was made, or something along similar lines. I was just > wondering if "something along similar lines" exists, and I'm just missing > it, or if changing the configuration on the fly under heavy load is likely > to cause chaos and mayhem? > I think we have to address this synchronization problem in the Synapse Configuration (with the introduction of the user management) Thanks, Ruwan -- Ruwan Linton http://www.wso2.org - "Oxygenating the Web Services Platform"
