Hi Senaka,

On Tue, Jul 17, 2012 at 4:52 AM, Senaka Fernando <[email protected]> wrote:

> Hi Janaka,
>
> Are you suggesting that this needs to be done for C4? Or is this e-mail
> FTR?
>
We are not in a position to do this for C4. But if we are doing a patch
release in the kernel before C5, then my strong belief is that we should
fix this in that patch release.

Thanks,
Janaka

>
> Thanks,
> Senaka.
>
> On Mon, Jul 16, 2012 at 3:40 PM, Janaka Ranabahu <[email protected]> wrote:
>
>> Hi All,
>>
>> I have noticed that the property handling in registry core is not done
>> properly. The ResourceDAO interface(which is the data access object for
>> resources) has only 2 methods which is related to properties and that is to
>> add properties and remove properties[1]. I have noticed that we call the
>> add properties method for both resource add and update operations. In other
>> words, for each add or update operation of a resource, we insert all its
>> properties again to the database. This behavior is there even if we turn
>> off resource versioning.
>>
>> IMO, this is an critical issue and it can lead to unnecessary database
>> growth. Also note that this causes unnecessary calls to the database too.
>> To insert a single property, we use 3 queries and because of that 3
>> database calls happens. This number multiplies by the number of properties
>> for that resource. If we had 10 properties for a resource, the registry
>> core will do additional 30 database calls when the resource get
>> updated. Because of this reason, the REG_PROPERTY and
>> REG_RESOURCE_PROPERTY tables keep growing.
>>
>> Please note that this is one of the reasons why we see a performance
>> degradation when we connect to a remote database and do certain operations
>> like lifecycle management(since it uses properties to hold certain
>> information). AFAIK, most of our products use registry properties to store
>> various information and because of that this is a critical issue that needs
>> to be fixed.
>>
>> Thanks,
>> Janaka
>>
>> https://wso2.org/jira/browse/REGISTRY-870
>>
>> [1]
>> https://svn.wso2.org/repos/wso2/carbon/kernel/trunk/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/dao/ResourceDAO.java
>>
>> --
>> Janaka Ranabahu
>> Software Engineer
>> WSO2 Inc.
>>
>> Mobile +94 718370861
>> Email : [email protected]
>> Blog : janakaranabahu.blogspot.com
>>
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> *Senaka Fernando*
> Member - Integration Technologies Management Committee;
> Technical Lead; WSO2 Inc.; http://wso2.com*
> Member; Apache Software Foundation; http://apache.org
>
> E-mail: senaka AT wso2.com
> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
> Linked-In: http://linkedin.com/in/senakafernando
>
> *Lean . Enterprise . Middleware
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Janaka Ranabahu
Software Engineer
WSO2 Inc.

Mobile +94 718370861
Email : [email protected]
Blog : janakaranabahu.blogspot.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to