You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Ruwan Linton <ru...@gmail.com> on 2007/03/01 05:53:56 UTC

Re: Simplifying Properties / use of Registries...

On 3/1/07, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
>
> Let me see whether I can recap where we are now .. kinda lost in the
> thread. Sorry for being slow to jump in. I'm going to propose some mods
> too in what follows:
>
> (Warning: at first this may look very different but all I've done is
> renamed elements to use verbs and nouns correctly .. verbs are for actions
> and nouns for definitions.)
>
> <synapse>
>    <!-- external registry to use to look for stuff when stuff is not
>         found in the local registry -->
>    <define-registry>
>      .. info needed to define the parent registry ..
>    </define-registry>?
>
>    <!-- insert a named endpoint to the local registry -->
>    <define-endpoint key="string">
>      .. content as defined earlier for enhanced endpoints ..
>    </define-endpoint>*
>
>    <!-- insert a named sequence into the local registry. The sequence
>         names "main" and "fault" are special as proposed in this
>         thread. -->
>    <define-sequence key="string">
>      ..
>    </define-sequence>*
>
>    <!-- add an arbitrary thing into the registry -->
>    <insert-registry key="string" [src="url"]>
>      string or xml
>    </insert-registry>*
>
>    <!-- define a proxy service -->
>    <define-proxy-service ..>
>    </define-proxy-service>
>
>    <!-- mediators to execute as the default set of rules, unless "main"
>         sequence is defined in the registry. If "main" is defined then
>         these mediators will be ignored. (??) -->
>    mediator+
> </synapse>
>
> (I'd like to look at all the mediator names and make sure we name them
> with verbs but again that's cosmetic changes.)


here is the list of mediators we are currently having,

send - send out the message
log - log message according to the level specified
drop - drop the message
filter - filters the message according to the specified criteria
in - child mediators of this mediator will be executed if the message is
incoming to synapse
out - child mediators of this mediator will be executed if the message is
outgoing from synapse
make-fault - transforms the current message to a SOAP Fault
header - set SOAP headers or remove SOAP headers depending on the action
specified
set-property - set properties to the message context
script - executes the script specified in the mediator over the message
switch - simulates the switch statement
case/default - used inside the switch
class - picks the classes in the class path and execute them
spring - initializes the spring configuration specified and executes the
classes
validate - validate the message on the specified criteria
xslt - do the xslt transformation to the body of the soap message


I also don't see the need to force users to write all the definitions
> first and then the mediators. As we parse this XML, all we need to do is
> put any mediator statements into the "main" sequence and execute all the
> define-* things. Then when messages start flowing we're good to go.


Yes I also think that users should not be forced to use a particular
ordering of defining things. In this approach we can let the user, define
things when and where they want the them.

But do we really need the later part, i.e. the set of mediators. I think it
is enough to keep the main sequence mandatory.


This mail prolly doesn't make much sense yet (its late so it may not make
> sense ever!) so fire away.
>
> Ruwan I'm fine with fooBar instead of foo-bar too. Let's just pick one way
> for everything!
>
> Sanjiva.


Thanks,
Ruwan.



-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"