Re: [Dev] Distributed Caching
Here is a blog post I wrote summarizing the info about the caching impl http://blog.afkham.org/2013/11/wso2-multi-tenant-cache-jsr-107-jcache.html On Fri, Nov 22, 2013 at 9:06 AM, Afkham Azeez az...@wso2.com wrote: The caching implementation we have is an implementation of the JSR-107 (JCache) spec [1] If (Axis2) clustering is enabled, the cache works as a distributed cache. It is simply using a Hazelcast distributed map [2] per cache. If clustering is not enabled, then the same caching implementation works as an a local cache. There is no code change required in the code that uses JCache APIs to switch from local cache mode to distributed cache mode. In addition, in distributed cache mode, in order to improve performance, we have an L1 cache, which is simply implemented using HashMaps, and the L2 cache is implemented using Hazelcast distributed maps. So, we first check the L1 cache, and if there is a cache miss, we go to the L2 cache. If the value is located in the L2 cache, then we also store it in the L1 cache. In distributed mode, If a cache entry is removed or invalidated, then Hazelcast listeners we have registered get triggered on each every Hazelcast cluster member. That will result in the values in the L1 cache L2 cache being removed. 1. https://docs.google.com/document/d/1YZ-lrH6nW871Vd9Z34Og_EqbX_kxxJi55UrSn4yL2Ak/edit 2. http://www.hazelcast.com/docs/3.0/manual/multi_html/ch02.html#Map On Fri, Nov 22, 2013 at 7:52 AM, Srinath Perera srin...@wso2.com wrote: Pls ask Azeez, architecure@ should have some info On Thu, Nov 21, 2013 at 3:54 PM, Thilini Ishaka thil...@wso2.com wrote: Hi, Could you please point me to the architecture diagram (if available), and some notes related to Distributed Caching impl based on Hazelcast. Requesting this, in addition to the information in [Architecture] Caching implementation performance improvement mail thread. Thanks Thilini -- Thilini Ishaka Senior Software Engineer Phone: +94 11 214 5345 WSO2 Inc. http://wso2.com bolg: thiliniishaka.blogspot.com linkedin: http://lk.linkedin.com/in/thiliniishaka twitter: https://twitter.com/#!/ThiliniIsh -- Srinath Perera, Ph.D. Director, Research, WSO2 Inc. Visiting Faculty, University of Moratuwa Member, Apache Software Foundation Research Scientist, Lanka Software Foundation Blog: http://srinathsview.blogspot.com/ Photos: http://www.flickr.com/photos/hemapani/ Phone: 0772360902 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- *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* -- *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 http://lk.linkedin.com/in/afkhamazeez* *Lean . Enterprise . Middleware* ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Distributed Caching
Pls ask Azeez, architecure@ should have some info On Thu, Nov 21, 2013 at 3:54 PM, Thilini Ishaka thil...@wso2.com wrote: Hi, Could you please point me to the architecture diagram (if available), and some notes related to Distributed Caching impl based on Hazelcast. Requesting this, in addition to the information in [Architecture] Caching implementation performance improvement mail thread. Thanks Thilini -- Thilini Ishaka Senior Software Engineer Phone: +94 11 214 5345 WSO2 Inc. http://wso2.com bolg: thiliniishaka.blogspot.com linkedin: http://lk.linkedin.com/in/thiliniishaka twitter: https://twitter.com/#!/ThiliniIsh -- Srinath Perera, Ph.D. Director, Research, WSO2 Inc. Visiting Faculty, University of Moratuwa Member, Apache Software Foundation Research Scientist, Lanka Software Foundation Blog: http://srinathsview.blogspot.com/ Photos: http://www.flickr.com/photos/hemapani/ Phone: 0772360902 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Distributed Caching
The caching implementation we have is an implementation of the JSR-107 (JCache) spec [1] If (Axis2) clustering is enabled, the cache works as a distributed cache. It is simply using a Hazelcast distributed map [2] per cache. If clustering is not enabled, then the same caching implementation works as an a local cache. There is no code change required in the code that uses JCache APIs to switch from local cache mode to distributed cache mode. In addition, in distributed cache mode, in order to improve performance, we have an L1 cache, which is simply implemented using HashMaps, and the L2 cache is implemented using Hazelcast distributed maps. So, we first check the L1 cache, and if there is a cache miss, we go to the L2 cache. If the value is located in the L2 cache, then we also store it in the L1 cache. In distributed mode, If a cache entry is removed or invalidated, then Hazelcast listeners we have registered get triggered on each every Hazelcast cluster member. That will result in the values in the L1 cache L2 cache being removed. 1. https://docs.google.com/document/d/1YZ-lrH6nW871Vd9Z34Og_EqbX_kxxJi55UrSn4yL2Ak/edit 2. http://www.hazelcast.com/docs/3.0/manual/multi_html/ch02.html#Map On Fri, Nov 22, 2013 at 7:52 AM, Srinath Perera srin...@wso2.com wrote: Pls ask Azeez, architecure@ should have some info On Thu, Nov 21, 2013 at 3:54 PM, Thilini Ishaka thil...@wso2.com wrote: Hi, Could you please point me to the architecture diagram (if available), and some notes related to Distributed Caching impl based on Hazelcast. Requesting this, in addition to the information in [Architecture] Caching implementation performance improvement mail thread. Thanks Thilini -- Thilini Ishaka Senior Software Engineer Phone: +94 11 214 5345 WSO2 Inc. http://wso2.com bolg: thiliniishaka.blogspot.com linkedin: http://lk.linkedin.com/in/thiliniishaka twitter: https://twitter.com/#!/ThiliniIsh -- Srinath Perera, Ph.D. Director, Research, WSO2 Inc. Visiting Faculty, University of Moratuwa Member, Apache Software Foundation Research Scientist, Lanka Software Foundation Blog: http://srinathsview.blogspot.com/ Photos: http://www.flickr.com/photos/hemapani/ Phone: 0772360902 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- *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 http://lk.linkedin.com/in/afkhamazeez* *Lean . Enterprise . Middleware* ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Carbon-dev] Distributed caching should be tested thoroughly
Yes. It is jdk _24 in the setup but this is in my machine Prabath. /Charitha On Tue, May 17, 2011 at 7:16 AM, Prabath Siriwardena prab...@wso2.comwrote: Hi Charitha, +1 for testing this thoroughly... Small note - in JIRA it says we are testing with jdk1.6_21 - in fact what we recommend now is jdk1.6_24 - after the security fix in the JDK - better have our test setup upgraded as well.. Thanks regards, -Prabath On Tue, May 17, 2011 at 12:38 AM, Charitha Kankanamge chari...@wso2.com wrote: @Subject is a new feature and we are discovering random/unpredictable issues (eg:- [1]). Therefore, we should test this thoroughly. [1]https://wso2.org/jira/browse/CARBON-10028 Regards Charitha ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev -- Thanks Regards, Prabath http://blog.facilelogin.com http://RampartFAQ.com ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
Re: [Carbon-dev] Distributed caching should be tested thoroughly
On Tue, May 17, 2011 at 12:38 AM, Charitha Kankanamge chari...@wso2.comwrote: @Subject is a new feature and we are discovering random/unpredictable issues (eg:- [1]). Therefore, we should test this thoroughly. [1]https://wso2.org/jira/browse/CARBON-10028 There were some issue with authorization cache and fixed in r94430. Thanks, Asela. Regards Charitha ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
Re: [Carbon-dev] Distributed caching should be tested thoroughly
Thanks for fixing this Asela. Sameera, Can we have a new set of packs for QA testing please? Now I cannot continue testing because of this distributed caching issue. I cannot even log in to config registry instance in my cluster setup since I get ClassNotFoundException: org.wso2.carbon.user.core.authorization.AuthorizationKey. Also, in both app server nodes, I cannot browse the registry due to this error. I think it is time to have new set of packs. /Charitha On Wed, May 18, 2011 at 8:18 AM, Asela Pathberiya as...@wso2.com wrote: On Tue, May 17, 2011 at 12:38 AM, Charitha Kankanamge chari...@wso2.comwrote: @Subject is a new feature and we are discovering random/unpredictable issues (eg:- [1]). Therefore, we should test this thoroughly. [1]https://wso2.org/jira/browse/CARBON-10028 There were some issue with authorization cache and fixed in r94430. Thanks, Asela. Regards Charitha ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
Re: [Carbon-dev] Distributed caching should be tested thoroughly
On Wed, May 18, 2011 at 9:47 AM, Charitha Kankanamge chari...@wso2.comwrote: Thanks for fixing this Asela. Sameera, Can we have a new set of packs for QA testing please? Now I cannot continue testing because of this distributed caching issue. I cannot even log in to config registry instance in my cluster setup since I get ClassNotFoundException: org.wso2.carbon.user.core.authorization.AuthorizationKey. Also, in both app server nodes, I cannot browse the registry due to this error. I think it is time to have new set of packs. Will work on it. Packs will contain commits upto 9.45am today. /Charitha On Wed, May 18, 2011 at 8:18 AM, Asela Pathberiya as...@wso2.com wrote: On Tue, May 17, 2011 at 12:38 AM, Charitha Kankanamge chari...@wso2.comwrote: @Subject is a new feature and we are discovering random/unpredictable issues (eg:- [1]). Therefore, we should test this thoroughly. [1]https://wso2.org/jira/browse/CARBON-10028 There were some issue with authorization cache and fixed in r94430. Thanks, Asela. Regards Charitha ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev -- Thanks, Denis -- *Denis Weerasiri* Software Engineer; WSO2 Inc.; http://wso2.com, *email: denis http://goog_277208233/** [AT] wso2.com* http://wso2.com/* blog: **http://ddweerasiri.blogspot.com* http://ddweerasiri.blogspot.com/* twitter: **http://twitter.com/ddweerasiri* http://twitter.com/ddweerasiri* linked-in: **http://lk.linkedin.com/in/ddweerasiri*http://lk.linkedin.com/in/ddweerasiri ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
[Carbon-dev] Distributed caching should be tested thoroughly
@Subject is a new feature and we are discovering random/unpredictable issues (eg:- [1]). Therefore, we should test this thoroughly. [1]https://wso2.org/jira/browse/CARBON-10028 Regards Charitha ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
Re: [Carbon-dev] Distributed caching should be tested thoroughly
Hi Charitha, +1 for testing this thoroughly... Small note - in JIRA it says we are testing with jdk1.6_21 - in fact what we recommend now is jdk1.6_24 - after the security fix in the JDK - better have our test setup upgraded as well.. Thanks regards, -Prabath On Tue, May 17, 2011 at 12:38 AM, Charitha Kankanamge chari...@wso2.com wrote: @Subject is a new feature and we are discovering random/unpredictable issues (eg:- [1]). Therefore, we should test this thoroughly. [1]https://wso2.org/jira/browse/CARBON-10028 Regards Charitha ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev -- Thanks Regards, Prabath http://blog.facilelogin.com http://RampartFAQ.com ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev