Return-Path: Delivered-To: apmail-jakarta-turbine-jcs-user-archive@www.apache.org Received: (qmail 4023 invoked from network); 25 Jun 2004 12:46:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 25 Jun 2004 12:46:40 -0000 Received: (qmail 23124 invoked by uid 500); 25 Jun 2004 12:46:39 -0000 Delivered-To: apmail-jakarta-turbine-jcs-user-archive@jakarta.apache.org Received: (qmail 23012 invoked by uid 500); 25 Jun 2004 12:46:38 -0000 Mailing-List: contact turbine-jcs-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Turbine JCS Users List" Reply-To: "Turbine JCS Users List" Delivered-To: mailing list turbine-jcs-user@jakarta.apache.org Received: (qmail 22755 invoked by uid 99); 25 Jun 2004 12:46:35 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [194.250.98.246] (HELO mail-s.mpsa.com) (194.250.98.246) by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 25 Jun 2004 05:46:35 -0700 Received: from aigz1.domino.inetpsa.com ([172.21.41.51]) by mail-s.mpsa.com (Unknown version) with ESMTP id <0HZV0031W74ZOY@pydu46.inetpsa.com> for turbine-jcs-user@jakarta.apache.org; Fri, 25 Jun 2004 14:39:00 +0200 (MEST) Date: Fri, 25 Jun 2004 14:38:57 +0200 From: jerome.picard@mpsa.com Subject: Problem with the Lateral Cache. To: 'Turbine JCS Users List' Message-id: MIME-version: 1.0 X-Mailer: Lotus Notes Release 6.0.1CF1 March 04, 2003 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable X-MIMETrack: Serialize by Router on AIGZ1.DOMINO/S/PSA(Release 6.0.2CF2 HFB2 PSA_1 LVAE5W8HSV, LVAE5STP9N, BRIS5Q5JRH, JCIK5VESNL|April 20, 2004) at 25/06/2004 14:39:00 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello, I use "Lateral Cache" for test. In another mail, you have explain me the functionality of the "Lateral"= Cache. I thank you. This is your text : "Lateral cache treats all caches as peers. When a cache gets a cache mi= ss, it asks all the other caches if they have the object in question. If one o= f them responds, the object is returned as a cache hit, but IS NOT stored= locally. This topology is useful when you have caches which for the mos= t part maintain separate and unique indexes, but occasionally overlap. Al= so note that a local put does NOT result in a broadcast put to other later= als, but a remove WILL." But when I execute a test, I obtain another behaviour. I have two class "A" and "B". class "A" has a local cache "A". class "B" has a local cache "B". First test : I launch in first the class "B", this class want to retrieve many objec= t "User" in her local cache. I launch in second time the class "A", this class put in her local cach= e many object "User". At this moment, the class "B" retrieve and display all object "User". I= t's work. I stop the class "A" and her local cache. I am surprised , the class "B" always display object "User". However you said that : "If one of them responds, the object is returned as a cache hit, but IS NOT stored= locally." Second test : I launch in first the class "A" which put in her local cache many objec= t "User". I launch in second time the class "B" which try to retrieve all object "User". In this test, the class "B" always display NULL object. For this case you sai that : "When a cache gets a cache miss, it asks all the other caches if they have the object in question." In my test, it is not working. Is this a probleme of configuration ? Have you an idea ? Thanks for your answers. Regards, I join the cache file and code for the class "A" and "B". ### ### Cache A ### # JCS Config for unit testing, just a simple memory only cache jcs.default=3D jcs.default.cacheattributes=3Dorg.apache.jcs.engine.CompositeCacheAttri= butes jcs.default.cacheattributes.MaxObjects=3D1000 jcs.default.cacheattributes.MemoryCacheName=3Dorg.apache.jcs.engine.mem= ory.lru.LRUMemoryCache jcs.default.elementattributes=3Dorg.apache.jcs.engine.ElementAttributes= jcs.default.elementattributes.IsEternal=3Dfalse jcs.default.elementattributes.IsLateral=3Dfalse # SYSTEM GROUP ID CACHE jcs.system.groupIdCache=3D jcs.system.groupIdCache.cacheattributes=3Dorg.apache.jcs.engine.Composi= teCacheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=3D10000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=3Dorg.apache.jc= s.engine.memory.lru.LRUMemoryCache jcs.region.TEST=3DLTCP jcs.region.TEST.cacheattributes=3Dorg.apache.jcs.engine.CompositeCacheA= ttributes jcs.region.TEST.cacheattributes.MaxObjects=3D1000 jcs.region.TEST.cacheattributes.MemoryCacheName=3Dorg.apache.jcs.engine= .memory.lru.LRUMemoryCache jcs.region.TEST.elementattributes=3Dorg.apache.jcs.engine.ElementAttrib= utes jcs.region.TEST.elementattributes.IsRemote=3Dfalse jcs.region.TEST.elementattributes.IsEternal=3Dfalse jcs.region.TEST.elementattributes.IsLateral=3Dtrue # simple Lateral TCP auxiliary jcs.auxiliary.LTCP=3Dorg.apache.jcs.auxiliary.lateral.LateralCacheFacto= ry jcs.auxiliary.LTCP.attributes=3Dorg.apache.jcs.auxiliary.lateral.Latera= lCacheAttributes jcs.auxiliary.LTCP.attributes.TransmissionTypeName=3DTCP jcs.auxiliary.LTCP.attributes.TcpServers=3Dlocalhost:1110 jcs.auxiliary.LTCP.attributes.TcpListenerPort=3D1111 jcs.auxiliary.LTCP.attributes.PutOnlyMode=3Dfalse ### ### Cache B ### # JCS Config for unit testing, just a simple memory only cache jcs.default=3D jcs.default.cacheattributes=3Dorg.apache.jcs.engine.CompositeCacheAttri= butes jcs.default.cacheattributes.MaxObjects=3D1000 jcs.default.cacheattributes.MemoryCacheName=3Dorg.apache.jcs.engine.mem= ory.lru.LRUMemoryCache jcs.default.elementattributes=3Dorg.apache.jcs.engine.ElementAttributes= jcs.default.elementattributes.IsEternal=3Dfalse jcs.default.elementattributes.IsLateral=3Dfalse # SYSTEM GROUP ID CACHE jcs.system.groupIdCache=3D jcs.system.groupIdCache.cacheattributes=3Dorg.apache.jcs.engine.Composi= teCacheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=3D10000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=3Dorg.apache.jc= s.engine.memory.lru.LRUMemoryCache jcs.region.TEST=3DLTCP jcs.region.TEST.cacheattributes=3Dorg.apache.jcs.engine.CompositeCacheA= ttributes jcs.region.TEST.cacheattributes.MaxObjects=3D1000 jcs.region.TEST.cacheattributes.MemoryCacheName=3Dorg.apache.jcs.engine= .memory.lru.LRUMemoryCache jcs.region.TEST.elementattributes=3Dorg.apache.jcs.engine.ElementAttrib= utes jcs.region.TEST.elementattributes.IsRemote=3Dfalse jcs.region.TEST.elementattributes.IsEternal=3Dfalse jcs.region.TEST.elementattributes.IsLateral=3Dtrue # simple Lateral TCP auxiliary jcs.auxiliary.LTCP=3Dorg.apache.jcs.auxiliary.lateral.LateralCacheFacto= ry jcs.auxiliary.LTCP.attributes=3Dorg.apache.jcs.auxiliary.lateral.Latera= lCacheAttributes jcs.auxiliary.LTCP.attributes.TransmissionTypeName=3DTCP jcs.auxiliary.LTCP.attributes.TcpServers=3Dlocalhost:1111 jcs.auxiliary.LTCP.attributes.TcpListenerPort=3D1110 jcs.auxiliary.LTCP.attributes.PutOnlyMode=3Dfalse # # code of class A # try{ JCS.setConfigFilename("/cacheA.ccf"); JCS cache =3D JCS.getInstance("TEST"); for(int i=3D0;i<500;i++){ User usr =3D new User(new Long(i)); usr.setName("USER_" + i); cache.put("USER_" + i ,usr); } System.out.println("end..."); while(true){ // Nothing } }catch(CacheException cexp){ cexp.printStackTrace(); } # # code of class B # try{ JCS.setConfigFilename("/cacheB.ccf"); JCS cache =3D JCS.getInstance("TEST"); while(true){ for(int i=3D0;i<500;i++){ User usr =3D (User)cache.get("USER_" + i)= ; if(usr!=3Dnull) System.out.println("User N=B0 " + i= + " :" + usr.getName()); } } }catch(CacheException cexp){ cexp.printStackTrace(); }= --------------------------------------------------------------------- To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org