You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Paul Fremantle <pz...@gmail.com> on 2006/08/01 12:00:15 UTC
Re: Dynamic Sequences are here!
Cool
Very nice.
Now what would be really cool as a next step would be to the
synapse.xml be small static, that imports the "real" synapse.xml from
a registry. Then the whole config is dynamic and I can add proxy
services or rules without restarting.
Paul
On 7/31/06, Asankha C. Perera <as...@wso2.com> wrote:
>
> It is now possible to define a dynamic sequence in Synpase, using the same
> DynamicProperty & Registry concepts designed by Paul.
>
> The following example shows how a registry is first defined into Synapse
> (we only have support for a simple URL registry as of now), and how a named
> sequence is defined into Synapse, with a key into this registry. Now when
> the sequence is requested from the Synapse Configuration, it will look this
> up in the local cache, and if available and not yet expired - will use the
> sequence already built. If expired, it will compare the cached version
> number with the current copy in the registry and if required will update the
> cache and meta information (e.g. how long it could be cached etc), if
> expired but the version number matches, only meta information is updated. If
> the local cache does not exist or is outdated, a new copy from the registry
> is fetched, and the resulting sequence cached.
>
> The following example is a trivial case which attempts to show this
> feature, and this could be enhanced as required with the capabilities of the
> registry implementation.
>
> Next in store on this line of changes are,
> - Dynamic main mediator (Synapse Rules)
> - Dynamic Endpoints
> - Dynamic Proxies
>
> asankha
>
> -------------------------------- synapse configuration
> ---------------------------------------
> <synapse xmlns="http://ws.apache.org/ns/synapse">
> <registry
> provider="org.apache.synapse.registry.url.SimpleURLRegistry">
> <property name="root" value=""/>
> <property name="cachableDuration" value="15000"/>
> </registry>
> <definitions>
> <sequence name="dynamicsequence"
> key="file:synapse_repository/conf/sample/dynamic_sequence.xml"/>
>
> </definitions>
> <rules>
> <sequence ref="dynamicsequence"/>
> </rules>
> </synapse>
>
> -------------------------------- dynamic_sequence.xml
> ---------------------------------------
> <log level="custom"
> xmlns="http://ws.apache.org/ns/synapse">
> <property name="something" value="*** Test Message ***"/>
> <drop/>
> </log>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> synapse-dev-unsubscribe@ws.apache.org For additional
> commands, e-mail: synapse-dev-help@ws.apache.org
--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
http://bloglines.com/blog/paulfremantle
paul@wso2.com
"Oxygenating the Web Service Platform", www.wso2.com
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org