I'm attaching a document that describes the configuration model. Also I'm
attaching a synapse.xml and priority-configuration.xml. The second file can
be used to determine the priority at the transport level.

I did test this using a HTTP header to specify the priority at the transport
level. Then I did load synapse instance using apache ab. I couldn't load
this enough by running the client on the same machine. So I had to load
synapse using another machine. I did the same thing for mediation level
priority using a simple SOAP request.

Any advice on testing is greatly appreciated.

Once everything is finalized I'll create a more comprehensive configuration
document and contribute it to synapse.

Thanks,
Supun..

On Fri, Feb 12, 2010 at 11:27 AM, Asankha C. Perera <[email protected]>wrote:

> Hi Supun
> > To get this functionality in to ESB, we have implemented this feature
> > in to synapse at two different levels. They are at HTTP transport
> > level and mediation level.
> >
> > In the mediation level user can filter the messages using normal
> > synapse capabilities for determining the priority and execute a
> > sequence with a given priority.
> >
> > In the transport level there is a configuration to determine the
> > priority from HTTP properties and execute the sequences accordingly.
> I couldn't locate a sample configuration or any configuration language
> syntax documentation on the proposed changes.. could you point me to it
> and how you intend to verify that under load this functions as intended
> - ie. any test outline you plan to use
>
> cheers
> asankha
>
> --
> Asankha C. Perera
> AdroitLogic, http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Software Engineer, WSO2 Inc
http://wso2.org
supunk.blogspot.com

Attachment: Priority_Based_Mediation_Configuration.pdf
Description: Adobe PDF document

<priorityConfiguration>
    <priority-executor name="priority-executor">
        <queues isFixedCapacity="true" nextQueue="org.apache.synapse.commons.executors.PRRNextQueueAlgorithm">
            <queue size="100" priority="16"/>
            <queue size="100" priority="1"/>
        </queues>
    </priority-executor>

    <conditions>
        <condition priority="16">      
            <equal type="header" source="priority" value="5"/>        
        </condition>
        <condition priority="1">
            <equal type="header" source="priority" value="1"/>
        </condition>
    </conditions>
</priorityConfiguration>
<!--
  ~  Licensed to the Apache Software Foundation (ASF) under one
  ~  or more contributor license agreements.  See the NOTICE file
  ~  distributed with this work for additional information
  ~  regarding copyright ownership.  The ASF licenses this file
  ~  to you under the Apache License, Version 2.0 (the
  ~  "License"); you may not use this file except in compliance
  ~  with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~  Unless required by applicable law or agreed to in writing,
  ~  software distributed under the License is distributed on an
  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~  KIND, either express or implied.  See the License for the
  ~  specific language governing permissions and limitations
  ~  under the License.
  -->

<!-- Introduction to proxy services -->
<definitions xmlns="http://ws.apache.org/ns/synapse";>
    <priority-executor name="exec">
       <queues>
          <queue size="100" priority="1"/>
          <queue size="100" priority="10"/>
       </queues>
    </priority-executor>
    <proxy name="StockQuoteProxy">
        <target>
            <inSequence>
            <filter source="$trp:priority" regex="1">
                <then>
                   <enqueue priority="1" sequence="sequence_1" executor="exec"/>
                </then>
                <else>
                   <enqueue priority="10" sequence="sequence_1" executor="exec"/>
                </else>
             </filter>
            </inSequence>
	    <outSequence>
         	<send/>
	    </outSequence>
        </target>
        <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>
    </proxy>
    <sequence name="sequence_1">
        <send>
            <endpoint>
                <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
            </endpoint>
        </send>
    </sequence>
</definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to