On Wed, Oct 23, 2013 at 10:48 AM, Imesh Gunaratne <[email protected]> wrote:

> Thanks Lakmal!
>
> Nirmal:
> No, still support for multi-tenancy is not implemented. That should come
> under "Components to be Implemented". Thanks for reminding it.
>
> I actually didn't see these were configured from load-balancer.conf in the
> previous version:
> Endpoint was hard coded in the service component activate() method:
>
>  /* add Tenant Aware LB endpoint */
> TenantAwareLoadBalanceEndpoint tenantAwareEp = new
> TenantAwareLoadBalanceEndpoint();
> tenantAwareEp.init(synapseEnv);
> sendMediator.setEndpoint(tenantAwareEp);
>
> Algorithm was hard coded in endpoint init() method:
>
> LoadbalanceAlgorithm algorithm = null;
>         try {
>             OMElement payload = AXIOMUtil.stringToOM(generatePayLoad());
>             algorithm =
>                     LoadbalanceAlgorithmFactory.
>                             createLoadbalanceAlgorithm(payload, null);
>
>         }
> ...
> }
>
>     private String generatePayLoad() {
>         return " <serviceDynamicLoadbalance failover=\"true\"\n" +
>                 "
> algorithm=\"org.apache.synapse.endpoints.algorithms.RoundRobin\"" +
>                 //"
> configuration=\"$system:loadbalancer.xml\"" +
>                 "/>";
>     }
>
> IMO this is not a good programming practice.
>

Yes, initial developers had done it that way, but I remember I patched
somethings like Endpoint, but seems like those patches hasn't merged here.

>
> I agree that it is easier for the user to configure all load balancer
> specific parameters via a single configuration file. However when we look
> at the overall picture, I think it is better to keep Synapse main sequence
> related configuration in its main.xml file.
>

I tend to disagree. Whole point of introducing the loadbalancer conf file
is to make all the things configurable via a single file and to make all
configurations dev-ops friendly (eg: you don't need to know Synapse to
configure a LB endpoint).

Sorry, but I'm -1 for adding these back to main.xml.

PS: bit of history, these were resided in main.xml and they were moved out
from it, cause there were problems.

>
>
> Thanks
> Imesh
>
>
>
>
>
>
> On Wed, Oct 23, 2013 at 9:22 AM, Nirmal Fernando 
> <[email protected]>wrote:
>
>>
>>
>>
>> On Wed, Oct 23, 2013 at 9:09 AM, Imesh Gunaratne <[email protected]>wrote:
>>
>>> Hi All,
>>>
>>> The load balancer of the new architecture is now functional with its own
>>> algorithm interface and round robin implementation. Please find detailed
>>> information on the improvements done in this version below:
>>>
>>> *Improvements:*
>>> - Implemented an algorithm interface and its implementation for Round
>>> Robin
>>> - Moved hard coded values in main sequence to its xml file
>>>
>> Do you mind elaborating this change? We moved away from xml file to
>> loadbalncer conf file, since it's more dev-ops friendly. So, IMO better to
>> make all the things configurable via loadbalancer.conf file.
>>
>>
>> - Fixed logic which set the location value in the response header
>>> - Upgraded synapse version to 2.1.1 wso2v7
>>> - Changed default transport to pass-through
>>>
>>> I have tested this version with few application server instances and
>>> topology synchronization, session management, round robin algorithm, URL
>>> handling features worked as expected.
>>>
>>> *Commit Revision:*
>>> 4a1de9c56f297dde3446838733686330dea21562
>>>
>>> *Binary Package:*
>>>
>>> http://imesh.gunaratne.org/files/stratos/lb/apache-stratos-lb-4.0.0-IMV2.zip
>>>
>>>
>>> *Components to be Implemented:*
>>> Domain mappings
>>>
>>> Many Thanks
>>> Imesh
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Reply via email to