You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Afkham Azeez (JIRA)" <ji...@apache.org> on 2008/08/17 23:01:45 UTC

[jira] Created: (SYNAPSE-433) Loadbalance Algorithm is hardcoded

Loadbalance Algorithm is hardcoded
----------------------------------

                 Key: SYNAPSE-433
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-433
             Project: Synapse
          Issue Type: Bug
          Components: Endpoints
            Reporter: Afkham Azeez
            Priority: Critical
         Attachments: lb-algorithm.patch

There is no way to switch to a different algorithm other than round-robin without a code change. The load balancing has been hard coded to use round-robin algorithm.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Resolved: (SYNAPSE-433) Loadbalance Algorithm is hardcoded

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiranya Jayathilaka resolved SYNAPSE-433.
-----------------------------------------

    Resolution: Fixed

Fixed on SVN trunk. LB algorithm factory now considers the values of "policy" and "algorithm" attributes when creating a load balance algorithm implementation. A default constructor was added to the RoundRobin algorithm implementation to support instantiating from the class name.

If a policy is being specified it must be "roundRobin" since that is the only policy supported right now. If an algorithm is being specified it must be a valid class which implements the LoadbalanceAlgorithm interface.

In situations no policy or algorithm is specified RoundRobin will be used.


> Loadbalance Algorithm is hardcoded
> ----------------------------------
>
>                 Key: SYNAPSE-433
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-433
>             Project: Synapse
>          Issue Type: Bug
>          Components: Endpoints
>            Reporter: Afkham Azeez
>            Assignee: Hiranya Jayathilaka
>            Priority: Critical
>             Fix For: NIGHTLY
>
>         Attachments: lb-algorithm.patch
>
>
> There is no way to switch to a different algorithm other than round-robin without a code change. The load balancing has been hard coded to use round-robin algorithm.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-433) Loadbalance Algorithm is hardcoded

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625612#action_12625612 ] 

Ruwan Linton commented on SYNAPSE-433:
--------------------------------------

reviewed and committed the patch to the trunk

> Loadbalance Algorithm is hardcoded
> ----------------------------------
>
>                 Key: SYNAPSE-433
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-433
>             Project: Synapse
>          Issue Type: Bug
>          Components: Endpoints
>            Reporter: Afkham Azeez
>            Assignee: Ruwan Linton
>            Priority: Critical
>             Fix For: NIGHTLY
>
>         Attachments: lb-algorithm.patch
>
>
> There is no way to switch to a different algorithm other than round-robin without a code change. The load balancing has been hard coded to use round-robin algorithm.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Assigned: (SYNAPSE-433) Loadbalance Algorithm is hardcoded

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Linton reassigned SYNAPSE-433:
------------------------------------

    Assignee: Ruwan Linton

> Loadbalance Algorithm is hardcoded
> ----------------------------------
>
>                 Key: SYNAPSE-433
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-433
>             Project: Synapse
>          Issue Type: Bug
>          Components: Endpoints
>            Reporter: Afkham Azeez
>            Assignee: Ruwan Linton
>            Priority: Critical
>             Fix For: NIGHTLY
>
>         Attachments: lb-algorithm.patch
>
>
> There is no way to switch to a different algorithm other than round-robin without a code change. The load balancing has been hard coded to use round-robin algorithm.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Reopened: (SYNAPSE-433) Loadbalance Algorithm is hardcoded

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiranya Jayathilaka reopened SYNAPSE-433:
-----------------------------------------


I see two problems in the current load balance algorithm factory implementations.

1. round robin algorithm is still hard coded
2. algorithm factory does not read the algorithm implementation from the 'algorithm' attribute in the configuration.

Here is the erroneous method from the source.

public static LoadbalanceAlgorithm createLoadbalanceAlgorithm(OMElement loadbalanceElement, List endpoints) {

        LoadbalanceAlgorithm algorithm = null;

        String algorithmName = "roundRobin";
        OMAttribute algoAttribute = loadbalanceElement.getAttribute(new QName(null, XMLConfigConstants.ALGORITHM_NAME));
        if(algoAttribute != null) {
            algorithmName = algoAttribute.getAttributeValue();
        }

        if(algorithmName.equalsIgnoreCase("roundRobin")) {
                algorithm = new RoundRobin(endpoints);
        }

        return algorithm;
    }

The value of the ALGORITHM_NAME constant is "policy". So the method does not refer the "algorithm" attribute anywhere in the code.

> Loadbalance Algorithm is hardcoded
> ----------------------------------
>
>                 Key: SYNAPSE-433
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-433
>             Project: Synapse
>          Issue Type: Bug
>          Components: Endpoints
>            Reporter: Afkham Azeez
>            Assignee: Ruwan Linton
>            Priority: Critical
>             Fix For: NIGHTLY
>
>         Attachments: lb-algorithm.patch
>
>
> There is no way to switch to a different algorithm other than round-robin without a code change. The load balancing has been hard coded to use round-robin algorithm.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Resolved: (SYNAPSE-433) Loadbalance Algorithm is hardcoded

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Linton resolved SYNAPSE-433.
----------------------------------

       Resolution: Fixed
    Fix Version/s: NIGHTLY

Applied the patch to the trunk

> Loadbalance Algorithm is hardcoded
> ----------------------------------
>
>                 Key: SYNAPSE-433
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-433
>             Project: Synapse
>          Issue Type: Bug
>          Components: Endpoints
>            Reporter: Afkham Azeez
>            Assignee: Ruwan Linton
>            Priority: Critical
>             Fix For: NIGHTLY
>
>         Attachments: lb-algorithm.patch
>
>
> There is no way to switch to a different algorithm other than round-robin without a code change. The load balancing has been hard coded to use round-robin algorithm.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-433) Loadbalance Algorithm is hardcoded

Posted by "Afkham Azeez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Afkham Azeez updated SYNAPSE-433:
---------------------------------

    Attachment: lb-algorithm.patch

This patch allows users to provide the algorithm implementation class using the algorithm attribute of the loadbalance element.

> Loadbalance Algorithm is hardcoded
> ----------------------------------
>
>                 Key: SYNAPSE-433
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-433
>             Project: Synapse
>          Issue Type: Bug
>          Components: Endpoints
>            Reporter: Afkham Azeez
>            Priority: Critical
>         Attachments: lb-algorithm.patch
>
>
> There is no way to switch to a different algorithm other than round-robin without a code change. The load balancing has been hard coded to use round-robin algorithm.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Assigned: (SYNAPSE-433) Loadbalance Algorithm is hardcoded

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiranya Jayathilaka reassigned SYNAPSE-433:
-------------------------------------------

    Assignee: Hiranya Jayathilaka  (was: Ruwan Linton)

> Loadbalance Algorithm is hardcoded
> ----------------------------------
>
>                 Key: SYNAPSE-433
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-433
>             Project: Synapse
>          Issue Type: Bug
>          Components: Endpoints
>            Reporter: Afkham Azeez
>            Assignee: Hiranya Jayathilaka
>            Priority: Critical
>             Fix For: NIGHTLY
>
>         Attachments: lb-algorithm.patch
>
>
> There is no way to switch to a different algorithm other than round-robin without a code change. The load balancing has been hard coded to use round-robin algorithm.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org