Hi,

On Fri, Aug 16, 2013 at 7:43 PM, Sameera Jayasoma <same...@wso2.com> wrote:

> I've also seen some place where we need to improve in
> the TenantAwareLoadBalanceEndpoint class. Here are my observations.
>
> 1) Five different inner "for-loops". This is a bad smell in the code.
>

This five different inner 'for-loops' are not in
TenantAwareLoadBalanceEndpoint class but in 'LoadBalancerConfiguration'
file.

And on the top of the method that has five different inner loops, there's a
comment as follows (with a FIXME tag):

        *// FIXME if possible! I couldn't think of any other way to do
this, at this moment.
        // Note: some of these for-loops are pretty small, thus no
considerable performance overhead.*

So, as the comment says, +1  for re-visiting the code and fixing it.

 2) We do a registry lookup for each and every unknown host name. This bit
> of code is vulnerable to a DOS Attack.
>

@Lahiru please explain the context behind this.


> 3) This code looks more like procedural-oriented code.
>
>
You mean the code in this class??


> Lets do a proper code review on this and refactor the code for the next
> release. I've created a Redmine task for this.
>

+1. We need all the people who contributed to this code, to understand the
rationale behind.


> Thanks,
> Sameera.
>
>
> On Fri, Aug 16, 2013 at 4:43 PM, Afkham Azeez <az...@wso2.com> wrote:
>
>> There are a number of debug statements which do String concatenations,
>> and are not wrapped in log.isDebugEnabled() conditions. Such statements
>> will cause unnecessary performance overhead.
>>
>> --
>> *Afkham Azeez*
>> Director of Architecture; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://www.apache.org/
>> * <http://www.apache.org/>**
>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919
>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>> *
>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>> *
>> *
>> *Lean . Enterprise . Middleware*
>>
>
>
>
> --
> Sameera Jayasoma,
> Architect,
>
> WSO2, Inc. (http://wso2.com)
> email: same...@wso2.com
> blog: http://sameera.adahas.org
> twitter: https://twitter.com/sameerajayasoma
> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>
>
> Lean . Enterprise . Middleware
>



-- 

Thanks & regards,
Nirmal

Senior Software Engineer- Platform Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to