Hi all,

The RXT configuration is loaded just like any other registry resource. The
same caching principals work for it. Are we trying to solve another problem
here? Or did something actually break how registry caching works?

Thanks,
Senaka.

On Tue, Sep 16, 2014 at 7:25 AM, Pulasthi Supun <pulas...@wso2.com> wrote:

> Yes, Will be using the listener API provided in the javax.cache
>
> Regards,
> Pulasthi
>
> On Tue, Sep 16, 2014 at 11:53 AM, Afkham Azeez <az...@wso2.com> wrote:
>
>> I presume you are using the listener API provided by javax.cache.
>>
>> On Tue, Sep 16, 2014 at 11:47 AM, Pulasthi Supun <pulas...@wso2.com>
>> wrote:
>>
>>> Hi Shariq,
>>>
>>> Yes that is why we are using the cache. the cache will be distributed.
>>> When node 1 changes the RXT it will flip the parity bit in the cache entry
>>> that correspondence to the changed RXT, then the listener will be called in
>>> node 2 since the entry was changed. And within the listener the changes
>>> will be loaded to the artifact configuration map.
>>>
>>> Regards,
>>> Pulasthi
>>>
>>> On Tue, Sep 16, 2014 at 11:38 AM, Shariq Muhammed <sha...@wso2.com>
>>> wrote:
>>>
>>>> On Tue, Sep 16, 2014 at 11:28 AM, Pulasthi Supun <pulas...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi Azeez,
>>>>>
>>>>> Yes that can be done, that would reduce the number of DB calls
>>>>> further. We can simply keep an entry for each RXT type that will keep a
>>>>> parity bit as a value. Once a update is done the listener can query
>>>>> the exact RXT type that was changed and only load that value.
>>>>>
>>>>
>>>> One more thing, we need to consider a cluster scenario as well right.
>>>> If we update an RXT from node-1, then node-2 should also invalidate the
>>>> cache and look into the DB.
>>>>
>>>>
>>>>>
>>>>> Regards,
>>>>> Pulasthi
>>>>>
>>>>> On Tue, Sep 16, 2014 at 11:04 AM, Afkham Azeez <az...@wso2.com> wrote:
>>>>>
>>>>>> For this type of problem, caching coupled with loading only the
>>>>>> changed parts is the way to go.
>>>>>>
>>>>>> On Tue, Sep 16, 2014 at 10:53 AM, Pulasthi Supun <pulas...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> Currently when working with RXT's each time the
>>>>>>> loadGovernanceArtifacts method is called it in turn will call the
>>>>>>> DB to load the RXT's, this is to load any changes done to the RXT's
>>>>>>> . This a major performance hit especially in APIM since when
>>>>>>> loadGovernanceArtifacts is called multiple times a large number of
>>>>>>> DB calls are executed. After looking into this came up with the 
>>>>>>> following
>>>>>>> solution to reduce the number of database calls.
>>>>>>>
>>>>>>> We currently load all the artifact configurations to a map  that
>>>>>>> keeps all the artifact configurations against the tenant id. If we can 
>>>>>>> find
>>>>>>> out when the artifact configurations are updated we can limit the
>>>>>>> number of times the database is queried by loading the configurations 
>>>>>>> only
>>>>>>> when there has been a change. To track this we will keep a small
>>>>>>> distributed cache which will keep a entry for each tenant and will
>>>>>>> act as parity bit and add a listener for this cache for cache entry 
>>>>>>> update.
>>>>>>> The lister will then load the changes into the map that keeps the
>>>>>>> artifact configurations. This way will remove the need to query database
>>>>>>> every time. WDYT?
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>> Pulasthi
>>>>>>>
>>>>>>> --
>>>>>>> --
>>>>>>> Pulasthi Supun
>>>>>>> Software Engineer; WSO2 Inc.; http://wso2.com,
>>>>>>> Email: pulas...@wso2.com
>>>>>>> Mobile: +94 (71) 9258281
>>>>>>> Blog : http://pulasthisupun.blogspot.com/
>>>>>>> Git hub profile: https://github.com/pulasthi
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *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 <%2B94%2077%203320919>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
>>>>>> <http://lk.linkedin.com/in/afkhamazeez>*
>>>>>>
>>>>>> *Lean . Enterprise . Middleware*
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> Pulasthi Supun
>>>>> Software Engineer; WSO2 Inc.; http://wso2.com,
>>>>> Email: pulas...@wso2.com
>>>>> Mobile: +94 (71) 9258281
>>>>> Blog : http://pulasthisupun.blogspot.com/
>>>>> Git hub profile: https://github.com/pulasthi
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Thanks,
>>>> Shariq
>>>> Senior Software Engineer
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Pulasthi Supun
>>> Software Engineer; WSO2 Inc.; http://wso2.com,
>>> Email: pulas...@wso2.com
>>> Mobile: +94 (71) 9258281
>>> Blog : http://pulasthisupun.blogspot.com/
>>> Git hub profile: https://github.com/pulasthi
>>>
>>
>>
>>
>> --
>> *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 <%2B94%2077%203320919>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
>> <http://lk.linkedin.com/in/afkhamazeez>*
>>
>> *Lean . Enterprise . Middleware*
>>
>
>
>
> --
> --
> Pulasthi Supun
> Software Engineer; WSO2 Inc.; http://wso2.com,
> Email: pulas...@wso2.com
> Mobile: +94 (71) 9258281
> Blog : http://pulasthisupun.blogspot.com/
> Git hub profile: https://github.com/pulasthi
>



-- 


*[image: http://wso2.com] <http://wso2.com>Senaka Fernando*
Software Architect; WSO2 Inc.; http://wso2.com



*Member; Apache Software Foundation; http://apache.org
<http://apache.org>E-mail: senaka AT wso2.com <http://wso2.com>**P: +1 408
754 7388; ext: 51736*;


*M: +44 782 741 1966Linked-In: http://linkedin.com/in/senakafernando
<http://linkedin.com/in/senakafernando>*Lean . Enterprise . Middleware
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to