From jcs-userskarawilliams@example.com Fri Mar 13 10:43:19 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 83187 invoked from network); 13 Mar 2009 10:43:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 13 Mar 2009 10:43:19 -0000 Received: (qmail 64084 invoked by uid 500); 13 Mar 2009 10:43:18 -0000 Delivered-To: karawilliams@example.com Received: (qmail 64069 invoked by uid 500); 13 Mar 2009 10:43:18 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 64057 invoked by uid 99); 13 Mar 2009 10:43:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 03:43:18 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO mailserv.sofico.be) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 10:43:09 +0000 To: karawilliams@example.com Subject: Relation between client and remote server cache regions MIME-Version: 1.0 X-Mailer: Lotus Notes Release 7.0 August 18, 2005 Message-ID: <karawilliams@example.com> From: Jan Swaelens <karawilliams@example.com> Date: Fri, 13 Mar 2009 11:42:45 +0100 X-MIMETrack: Serialize by Router on domino2/sofico(Release 6.5.4FP2 | September 15, 2005) at 03/13/2009 11:43:10 AM, Serialize complete at 03/13/2009 11:43:10 AM Content-Type: multipart/alternative; boundary="=_alternative 003AD851C1257578_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 003AD851C1257578_= Content-Type: text/plain; charset="US-ASCII" I understand that the client cache needs to configure its cache regions and auxiliaries (incl the RemoteCacheFactory) to establish the client cache configuration. I also understand that the remote server needs to be configured with the registry(host, port, behavior) information to establish the server. What I don't quite get is how to configure the cache regions of the cache server. > Configuring regions on the cache server is obviously required (I get errors when I don't) > When I configure a region called X with let's say a disk auxiliary => I still see the regions A and B as defined by the cache clients when I access the JCSAdmin page, nothing to be seen of the region X I wonder how I should configure the regions of my cache server and how these client and server regions work together. Thanks for helping me understand this puzzle! --=_alternative 003AD851C1257578_=-- From jcs-userskarawilliams@example.com Fri Mar 13 11:52:11 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 10999 invoked from network); 13 Mar 2009 11:52:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 13 Mar 2009 11:52:09 -0000 Received: (qmail 47993 invoked by uid 500); 13 Mar 2009 11:52:08 -0000 Delivered-To: karawilliams@example.com Received: (qmail 47976 invoked by uid 500); 13 Mar 2009 11:52:08 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 47965 invoked by uid 99); 13 Mar 2009 11:52:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 04:52:08 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO switchfire.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 11:52:00 +0000 Received: from [83.161.120.155] ([83.161.120.155]) by switchfire.com with Microsoft SMTPSVC720-205-7607); Fri, 13 Mar 2009 11:51:37 +0000 Subject: Re: Relation between client and remote server cache regions From: Niall Gallagher <karawilliams@example.com> To: JCS Users List <karawilliams@example.com> In-Reply-To: <karawilliams@example.com> References: <karawilliams@example.com> Content-Type: multipart/alternative; boundary="=-x1f/RVA72TyB1WeOk0Wk" Date: Fri, 13 Mar 2009 11:51:37 +0000 Message-Id: <1236945097.11009.47.camel@niall-dell> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 X-OriginalArrivalTime: 13 Mar 2009 11:51:37.0122 (UTC) FILETIME=[10734820:01C9A3D2] X-TM-AS-Product-Ver: SMEX-83.161.120.1557-5.6.1016-16516.006 X-TM-AS-Result: No--12.642100-0.000000-31 X-Virus-Checked: Checked by ClamAV on apache.org --=-x1f/RVA72TyB1WeOk0Wk Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Jan, You can configure regions on the remote server much like you configure regions on client machines. We've found the easiest way to deploy JCS as a remote cache server is to package JCS as a web application as described on the JCS site: http://jakarta.apache.org/jcs/RemoteAuxCache.html We then deployed JCS to JBoss as a regular web application and it works fine. Anyway- you'll need to include a cache.ccf file in the remote cache server .war file you made, or make sure it's on the classpath on the server. When JBoss/tomcat (or whatever) initialises the RemoteCacheStartupServlet, that servlet will try to load a cache.ccf file from the classpath. In the cache.ccf file you put on the server, you configure the host, port etc. that the remote cache should listen on. Additionally, you can configure regions in the server's cache.ccf file too, exactly like you do on client servers. Basically our remote cache server's cache.ccf file is almost identical to our client servers' cache.ccf files, except that the cache.ccf on our remote server has 2 extra lines (which tell it which host and port to bind to) and the regions on our client machines are configured to use the remote cache auxiliary whereas server-side our regions (obviously) don't use that auxiliary. By the way the documentation on the JCS site specifies that the the ccf file on the remote server should be named "remote.cache.ccf". I think that is wrong. We found that it needed to be named "cache.ccf" just like on clients. The relevant source code in RemoteCacheStartupServlet which looks for the file as "cache.ccf" is here: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/server/RemoteCacheStartupServlet.java?view=markup By the way if you don't explicitly configure a region at all on the server and a client machine puts an object into a region which has been configured client-side only and is configured to use the remote cache auxiliary (whether configured explicitly in client-side cache.ccf or by putting an object into an unconfigured region which inherits some default settings), the object will be sent to the server and the server will configure the region server-side automatically, but settings for that region server-side will inherit from the *default* settings you configured in the server's cache.ccf file. Be aware of that because if your client-side settings for a region differ from the server-side settings for a region, objects in that region will have different lifetimes etc. depending on (say) whether they've been retrieved from the remote server to the client server or not. This behaviour is logical and sometimes useful, but we generally ensure that we configure the same settings for a region server-side as we do client-side to make the lifetime of objects consistent. Good luck, Niall On Fri, 2009-03-13 at 11:42 +0100, Jan Swaelens wrote: > I understand that the client cache needs to configure its cache regions > and auxiliaries (incl the RemoteCacheFactory) to establish the client > cache configuration. > I also understand that the remote server needs to be configured with the > registry(host, port, behavior) information to establish the server. > What I don't quite get is how to configure the cache regions of the cache > server. > > Configuring regions on the cache server is obviously required (I get > errors when I don't) > > When I configure a region called X with let's say a disk auxiliary => I > still see the regions A and B as defined by the cache clients when I > access the JCSAdmin page, nothing to be seen of the region X > I wonder how I should configure the regions of my cache server and how > these client and server regions work together. > > Thanks for helping me understand this puzzle! --=-x1f/RVA72TyB1WeOk0Wk-- From jcs-userskarawilliams@example.com Fri Mar 13 13:24:18 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 54280 invoked from network); 13 Mar 2009 13:24:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 13 Mar 2009 13:24:18 -0000 Received: (qmail 70656 invoked by uid 500); 13 Mar 2009 13:24:18 -0000 Delivered-To: karawilliams@example.com Received: (qmail 70623 invoked by uid 500); 13 Mar 2009 13:24:18 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 70612 invoked by uid 99); 13 Mar 2009 13:24:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 06:24:18 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO mailserv.sofico.be) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 13:24:09 +0000 In-Reply-To: <1236945097.11009.47.camel@niall-dell> To: "JCS Users List" <karawilliams@example.com> Subject: Re: Relation between client and remote server cache regions MIME-Version: 1.0 X-Mailer: Lotus Notes Release 7.0 August 18, 2005 Message-ID: <karawilliams@example.com> From: Jan Swaelens <karawilliams@example.com> Date: Fri, 13 Mar 2009 14:23:44 +0100 X-MIMETrack: Serialize by Router on domino2/sofico(Release 6.5.4FP2 | September 15, 2005) at 03/13/2009 02:24:10 PM, Serialize complete at 03/13/2009 02:24:10 PM Content-Type: multipart/alternative; boundary="=_alternative 00499535C1257578_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 00499535C1257578_= Content-Type: text/plain; charset="US-ASCII" Hello Niall, We are also deploying the JCS war on an application server (WebLogic, WebSphere ...) which seems to be the most 'robust' approach to running a cache server. I also found that the properties file must be called 'cache.ccf' if you use this approach. If you use the startup scripts to run the server outside of a servlet container the file must be called 'remote.cache.ccf'. Thanks for your information about the automatic configuration of the server cache region upon a client's store, that response was what I was looking for! Thanks! --=_alternative 00499535C1257578_=-- From jcs-userskarawilliams@example.com Mon Mar 16 15:58:00 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 81718 invoked from network); 16 Mar 2009 15:58:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 16 Mar 2009 15:58:00 -0000 Received: (qmail 15667 invoked by uid 500); 16 Mar 2009 15:57:59 -0000 Delivered-To: karawilliams@example.com Received: (qmail 15649 invoked by uid 500); 16 Mar 2009 15:57:59 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 15634 invoked by uid 99); 16 Mar 2009 15:57:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 08:57:59 -0700 X-ASF-Spam-Status: No, hits=4.8 required=10.0 tests=DNS_FROM_OPENWHOIS,HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of karawilliams@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 15:57:50 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <karawilliams@example.com>) id 1LjFBx-000254-Il for karawilliams@example.com; Mon, 16 Mar 2009 08:57:29 -0700 Message-ID: <karawilliams@example.com> Date: Mon, 16 Mar 2009 08:57:29 -0700 (PDT) From: Yaswanth <karawilliams@example.com> To: karawilliams@example.com Subject: Implementing Remote Cache using JCS . MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_52592_17856036.1237219049575" X-Nabble-From: karawilliams@example.com X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_52592_17856036.1237219049575 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I am trying to implement Remote Cache using JCS. Below is my Server and Client Code. Here are my http://www.nabble.com/file/p22541180/remote.cache.server.ccf Server and http://www.nabble.com/file/p22541180/remote.cache.client.ccf Client Cache configuration files. My ServerCode : RemoteCacheServerFactory.main(new String[]{"/remote.cache.server.ccf"}); My Client1 Code : JCS.setConfigFilename( "/remote.cache.client.ccf" ); JCS cache = JCS.getInstance( "testCache" ); cache.put("Key"+i, "Value"+i); // So many times.. While loop My Client2 Code : JCS.setConfigFilename( "/remote.cache.client.ccf" ); JCS cache = JCS.getInstance( "testCache" ); cache.get("Key"+i); // So many times. While loop I am running a JCS Remote Server and Starting Two Remote Clients. Using One client i am adding 10K Objects into cache and after that i am using using another client i am retrieving them. At this time my average retrieval time is 2.3 Seconds. When i rerun the test case with 100K objects . My average retrieval rate is 302 Seconds. I observed that my retrieval rates are very slow, which i think shouldn't be. Can anyone point out where the problem is ? Thanks, Yaswanth -- View this message in context: http://www.nabble.com/Implementing-Remote-Cache-using-JCS-.-tp22541180p22541180.html Sent from the JCS - Users mailing list karawilliams@example.com. ------=_Part_52592_17856036.1237219049575-- From jcs-userskarawilliams@example.com Mon Mar 16 15:59:01 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 81952 invoked from network); 16 Mar 2009 15:59:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 16 Mar 2009 15:59:01 -0000 Received: (qmail 19559 invoked by uid 500); 16 Mar 2009 15:59:01 -0000 Delivered-To: karawilliams@example.com Received: (qmail 19537 invoked by uid 500); 16 Mar 2009 15:59:01 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 19516 invoked by uid 99); 16 Mar 2009 15:59:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 08:59:01 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of karawilliams@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 15:58:53 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <karawilliams@example.com>) id 1LjFCy-00028T-Np for karawilliams@example.com; Mon, 16 Mar 2009 08:58:32 -0700 Message-ID: <karawilliams@example.com> Date: Mon, 16 Mar 2009 08:58:32 -0700 (PDT) From: Yaswanth <karawilliams@example.com> To: karawilliams@example.com Subject: Implementing Remote Cache using JCS . MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: karawilliams@example.com X-Virus-Checked: Checked by ClamAV on apache.org Hi, I am trying to implement Remote Cache using JCS. Below is my Server and Client Code. Here are my http://www.nabble.com/file/p22541185/remote.cache.server.ccf Server and http://www.nabble.com/file/p22541185/remote.cache.client.ccf Client Cache configuration files. My ServerCode : RemoteCacheServerFactory.main(new String[]{"/remote.cache.server.ccf"}); My Client1 Code : JCS.setConfigFilename( "/remote.cache.client.ccf" ); JCS cache = JCS.getInstance( "testCache" ); cache.put("Key"+i, "Value"+i); // So many times.. While loop My Client2 Code : JCS.setConfigFilename( "/remote.cache.client.ccf" ); JCS cache = JCS.getInstance( "testCache" ); cache.get("Key"+i); // So many times. While loop I am running a JCS Remote Server and Starting Two Remote Clients. Using One client i am adding 10K Objects into cache and after that i am using using another client i am retrieving them. At this time my average retrieval time is 2.3 Seconds. When i rerun the test case with 100K objects . My average retrieval rate is 302 Seconds. I observed that my retrieval rates are very slow, which i think shouldn't be. Can anyone point out where the problem is ? Thanks, Yaswanth -- View this message in context: http://www.nabble.com/Implementing-Remote-Cache-using-JCS-.-tp22541185p22541185.html Sent from the JCS - Users mailing list karawilliams@example.com. --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From jcs-userskarawilliams@example.com Mon Mar 16 16:15:30 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 17007 invoked from network); 16 Mar 2009 16:15:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 16 Mar 2009 16:15:30 -0000 Received: (qmail 45872 invoked by uid 500); 16 Mar 2009 16:15:30 -0000 Delivered-To: karawilliams@example.com Received: (qmail 45853 invoked by uid 500); 16 Mar 2009 16:15:30 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 45842 invoked by uid 99); 16 Mar 2009 16:15:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 09:15:30 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of karawilliams@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 16:15:22 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <karawilliams@example.com>) id 1LjFSv-00031E-M1 for karawilliams@example.com; Mon, 16 Mar 2009 09:15:01 -0700 Message-ID: <karawilliams@example.com> Date: Mon, 16 Mar 2009 09:15:01 -0700 (PDT) From: Yaswanth <karawilliams@example.com> To: karawilliams@example.com Subject: Re: Implementing Remote Cache using JCS . In-Reply-To: <karawilliams@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: karawilliams@example.com References: <karawilliams@example.com> X-Virus-Checked: Checked by ClamAV on apache.org There seems to be some problem with the configuration files.. i am reattaching them .. http://www.nabble.com/file/p22541195/remote.cache.client.ccf remote.cache.client.ccf http://www.nabble.com/file/p22541195/remote.cache.server.ccf remote.cache.server.ccf Yaswanth wrote: > > Hi, > > I am trying to implement Remote Cache using JCS. > > Below is my Server and Client Code. Here are my > http://www.nabble.com/file/p22541185/remote.cache.server.ccf Server and > http://www.nabble.com/file/p22541185/remote.cache.client.ccf Client Cache > configuration files. > > My ServerCode : > RemoteCacheServerFactory.main(new String[]{"/remote.cache.server.ccf"}); > > My Client1 Code : > JCS.setConfigFilename( "/remote.cache.client.ccf" ); > JCS cache = JCS.getInstance( "testCache" ); > cache.put("Key"+i, "Value"+i); // So many times.. While loop > > My Client2 Code : > JCS.setConfigFilename( "/remote.cache.client.ccf" ); > JCS cache = JCS.getInstance( "testCache" ); > cache.get("Key"+i); // So many times. While loop > > > I am running a JCS Remote Server and Starting Two Remote Clients. > > Using One client i am adding 10K Objects into cache and after that i am > using using another client i am retrieving them. At this time my average > retrieval time is 2.3 Seconds. > > When i rerun the test case with 100K objects . My average retrieval rate > is 302 Seconds. > > I observed that my retrieval rates are very slow, which i think shouldn't > be. Can anyone point out where the problem is ? > > Thanks, > Yaswanth > -- View this message in context: http://www.nabble.com/Implementing-Remote-Cache-using-JCS-.-tp22541185p22541195.html Sent from the JCS - Users mailing list karawilliams@example.com. --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From jcs-userskarawilliams@example.com Mon Mar 16 18:12:41 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 77870 invoked from network); 16 Mar 2009 18:12:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 16 Mar 2009 18:12:41 -0000 Received: (qmail 38642 invoked by uid 500); 16 Mar 2009 18:12:41 -0000 Delivered-To: karawilliams@example.com Received: (qmail 38622 invoked by uid 500); 16 Mar 2009 18:12:41 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 38611 invoked by uid 99); 16 Mar 2009 18:12:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 11:12:40 -0700 X-ASF-Spam-Status: No, hits=2.4 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO switchfire.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 18:12:31 +0000 Received: from [83.161.120.155] ([83.161.120.155]) by switchfire.com with Microsoft SMTPSVC720-205-7607); Mon, 16 Mar 2009 18:12:10 +0000 Subject: Re: Implementing Remote Cache using JCS . From: Niall Gallagher <karawilliams@example.com> To: JCS Users List <karawilliams@example.com> In-Reply-To: <karawilliams@example.com> References: <karawilliams@example.com> Content-Type: multipart/alternative; boundary="=-7B7PycaNh3NkBrSyhIv5" Date: Mon, 16 Mar 2009 18:12:13 +0000 Message-Id: <1237227133.27497.331.camel@niall-dell> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 X-OriginalArrivalTime: 16 Mar 2009 18:12:10.0971 (UTC) FILETIME=[B9B962B0:01C9A662] X-TM-AS-Product-Ver: SMEX-83.161.120.1557-5.6.1016-16524.001 X-TM-AS-Result: No--13.373100-0.000000-31 X-Virus-Checked: Checked by ClamAV on apache.org --=-7B7PycaNh3NkBrSyhIv5 Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Yaswanth, "my average retrieval time is 2.3 Seconds" -is that 2.3 seconds per object or 2.3 seconds per 10,000 objects? Whichever the case- I'd not expect retrieval time from a remote cache server to be faster than say retrieving from a database, if that's what you're comparing with. The point of JCS is not to compete with database drivers in network round-trip retrieval speed. The point is to eliminate network round trips. If, in your test, one server is putting an object into the cache and you are timing how long it takes the other server to retrieve it, you won't be getting real-world statistics. You should time how long it would take the second server to retrieve the same object multiple times, which is what your app would probably be doing in production (if your data is cacheable i.e. is repeatedly read more than once). Also you should have a warm-up run in your test because initialising the cache takes a couple of seconds but only happens at application startup. The remote cache server is not a distributed cache by itself - it exists to *coordinate* the distributed cache. The JCS client libraries which you'll have in each application connect to and retrieve objects from the remote cache server and then keep copies in local RAM to allow them to avoid network round trips when they next need the same data. The remote cache in the meantime keeps each client in sync with other clients by notifying clients when data changes. If n=retrieval iteration, you'll probably find that when n=1, timetaken=0.5 seconds n=2, timetaken=0.00004 seconds n=3, timetaken=0.00004 seconds ..and so on. Then you need to run the same test, but this time comparing time taken when you repeatedly read from a busy database. Databases have built-in caches, so for n=2 you'll see a slight improvement, but it will still be at least hundreds of times slower than retrieving from local RAM. Kind regards, Niall On Mon, 2009-03-16 at 08:58 -0700, Yaswanth wrote: > Hi, > > I am trying to implement Remote Cache using JCS. > > Below is my Server and Client Code. Here are my > http://www.nabble.com/file/p22541185/remote.cache.server.ccf Server and > http://www.nabble.com/file/p22541185/remote.cache.client.ccf Client Cache > configuration files. > > My ServerCode : > RemoteCacheServerFactory.main(new String[]{"/remote.cache.server.ccf"}); > > My Client1 Code : > JCS.setConfigFilename( "/remote.cache.client.ccf" ); > JCS cache = JCS.getInstance( "testCache" ); > cache.put("Key"+i, "Value"+i); // So many times.. While loop > > My Client2 Code : > JCS.setConfigFilename( "/remote.cache.client.ccf" ); > JCS cache = JCS.getInstance( "testCache" ); > cache.get("Key"+i); // So many times. While loop > > > I am running a JCS Remote Server and Starting Two Remote Clients. > > Using One client i am adding 10K Objects into cache and after that i am > using using another client i am retrieving them. At this time my average > retrieval time is 2.3 Seconds. > > When i rerun the test case with 100K objects . My average retrieval rate is > 302 Seconds. > > I observed that my retrieval rates are very slow, which i think shouldn't > be. Can anyone point out where the problem is ? > > Thanks, > Yaswanth --=-7B7PycaNh3NkBrSyhIv5-- From jcs-userskarawilliams@example.com Mon Mar 16 18:46:18 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 3531 invoked from network); 16 Mar 2009 18:46:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 16 Mar 2009 18:46:16 -0000 Received: (qmail 79774 invoked by uid 500); 16 Mar 2009 18:46:16 -0000 Delivered-To: karawilliams@example.com Received: (qmail 79755 invoked by uid 500); 16 Mar 2009 18:46:16 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 79743 invoked by uid 99); 16 Mar 2009 18:46:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 11:46:16 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO web38707.mail.mud.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 16 Mar 2009 18:46:06 +0000 Received: (qmail 8820 invoked by uid 60001); 16 Mar 2009 18:45:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1237229144; bh=AAdwe0EbFfFcs6bpyrt+tW39IFu6wgMRkzrjuhPUqa0=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=2zq85HDEMd4V6xslOryGYU2mFc8sz2M4+N1h1EQgR5FVCOm3VeTmamwuNUH9c+TCIA4u+588H+hN+Npnsouo1sLp/FGGLcSEMj1f6ZqEA4zhx80zfELk/tQIpuM4R26N+gFMmzUHRBgnjqzotJAHTBED8SDHTdoQom2UslxvMfI= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=Ns2GYA03c8vURDv9Q40TQ2pZprzR9R758wZg4LX4mEyDuJC/0flBvGg3ULRfLFrIc4gSDVVYh6dW5pUWnEJjwBK0+RYmVCqC8Nm2O/2Sap53MIFcvnVKnqyz2J5ILzkFr7nuQfGZPtxqYF/C+w1ZAfXmrXNYOSjrmH2jgeLil6k=; Message-ID: <karawilliams@example.com> X-YMail-OSG: RkiaFTgVM1l4VMFPUptYLmZzHTtmuU9.Q7jGZCtF4mpX1_FOVNTn3nfjnwPJ_nCgNwRjCo25_3GluEw5qkhDgQyMhqB4AFt59Gp54zy7p.8glH8ZmTgZW0ZNmvFrbC3LJJVeqllT52nK8slxwo1SjpPnMd6GMIBghnMdLlu3.g75K..280QeamnNyqLpi0PwDx3obK3gAVrJu8p5.6CETXVfbI6RRF3YKl84 Received: from [83.161.120.155] by web38707.mail.mud.yahoo.com via HTTP; Mon, 16 Mar 2009 11:45:44 PDT X-Mailer: YahooMailWebService/0.7.289.1 Date: Mon, 16 Mar 2009 11:45:44 -0700 (PDT) From: Aaron Smuts <karawilliams@example.com> Reply-To: karawilliams@example.com Subject: Re: Implementing Remote Cache using JCS . To: JCS Users List <karawilliams@example.com> In-Reply-To: <1237227133.27497.331.camel@niall-dell> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org You should expect to see single ms. latency from the remote server. It's extremely fast. I can typically get data from mysql behind the RMI remote cache to the client in less than 10 ms. Make sure that the log level is higher than debug. Only run at info or above. Other than that, I can't tell you much. I don't have enough information. Perhaps your machine is overloaded. Aaron --- On Mon, 3/16/09, Niall Gallagher <karawilliams@example.com> wrote: > From: Niall Gallagher <karawilliams@example.com> > Subject: Re: Implementing Remote Cache using JCS . > To: "JCS Users List" <karawilliams@example.com> > Date: Monday, March 16, 2009, 11:12 AM > Hi Yaswanth, > > "my average retrieval time is 2.3 Seconds" > -is that 2.3 seconds per object or 2.3 seconds per 10,000 > objects? > > Whichever the case- I'd not expect retrieval time from > a remote cache > server to be faster than say retrieving from a database, if > that's what > you're comparing with. The point of JCS is not to > compete with database > drivers in network round-trip retrieval speed. The point is > to eliminate > network round trips. > > If, in your test, one server is putting an object into the > cache and you > are timing how long it takes the other server to retrieve > it, you won't > be getting real-world statistics. You should time how long > it would take > the second server to retrieve the same object multiple > times, which is > what your app would probably be doing in production (if > your data is > cacheable i.e. is repeatedly read more than once). Also you > should have > a warm-up run in your test because initialising the cache > takes a couple > of seconds but only happens at application startup. > > The remote cache server is not a distributed cache by > itself - it exists > to *coordinate* the distributed cache. The JCS client > libraries which > you'll have in each application connect to and retrieve > objects from the > remote cache server and then keep copies in local RAM to > allow them to > avoid network round trips when they next need the same > data. The remote > cache in the meantime keeps each client in sync with other > clients by > notifying clients when data changes. > > If n=retrieval iteration, you'll probably find that > when > > n=1, timetaken=0.5 seconds > n=2, timetaken=0.00004 seconds > n=3, timetaken=0.00004 seconds > ..and so on. > > Then you need to run the same test, but this time comparing > time taken > when you repeatedly read from a busy database. Databases > have built-in > caches, so for n=2 you'll see a slight improvement, but > it will still be > at least hundreds of times slower than retrieving from > local RAM. > > Kind regards, > > Niall > > > On Mon, 2009-03-16 at 08:58 -0700, Yaswanth wrote: > > > Hi, > > > > I am trying to implement Remote Cache using JCS. > > > > Below is my Server and Client Code. Here are my > > > http://www.nabble.com/file/p22541185/remote.cache.server.ccf > Server and > > > http://www.nabble.com/file/p22541185/remote.cache.client.ccf > Client Cache > > configuration files. > > > > My ServerCode : > > RemoteCacheServerFactory.main(new > String[]{"/remote.cache.server.ccf"}); > > > > My Client1 Code : > > JCS.setConfigFilename( > "/remote.cache.client.ccf" ); > > JCS cache = JCS.getInstance( "testCache" ); > > cache.put("Key"+i, "Value"+i); // > So many times.. While loop > > > > My Client2 Code : > > JCS.setConfigFilename( > "/remote.cache.client.ccf" ); > > JCS cache = JCS.getInstance( "testCache" ); > > cache.get("Key"+i); // So many times. While > loop > > > > > > I am running a JCS Remote Server and Starting Two > Remote Clients. > > > > Using One client i am adding 10K Objects into cache > and after that i am > > using using another client i am retrieving them. At > this time my average > > retrieval time is 2.3 Seconds. > > > > When i rerun the test case with 100K objects . My > average retrieval rate is > > 302 Seconds. > > > > I observed that my retrieval rates are very slow, > which i think shouldn't > > be. Can anyone point out where the problem is ? > > > > Thanks, > > Yaswanth --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From jcs-userskarawilliams@example.com Mon Mar 16 21:36:32 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 78694 invoked from network); 16 Mar 2009 21:36:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 16 Mar 2009 21:36:32 -0000 Received: (qmail 67287 invoked by uid 500); 16 Mar 2009 21:36:31 -0000 Delivered-To: karawilliams@example.com Received: (qmail 67269 invoked by uid 500); 16 Mar 2009 21:36:31 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 67258 invoked by uid 99); 16 Mar 2009 21:36:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 14:36:31 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO web32407.mail.mud.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 16 Mar 2009 21:36:23 +0000 Received: (qmail 5961 invoked by uid 60001); 16 Mar 2009 21:36:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1237239362; bh=OUlYhvbMlP0yGCcJAIhZVEYeDM2m/OasRzdKWbqpiIo=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=dzfBic/MbtAnqd30lhxahQNpNeQLudMq97N7DWmzL1p6W0nde7ITsip2esI2UG0ryphcp6ToFJr1ej/uSQlV8UTV1pZvsgVD1VZmo2h4SR2B3/xaX08W6qCKQtuPHKfa/yuvvXRtmDZcgTpMFu3hrz2W3AXigGhYDZyTzEY2y/8= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=Jj4kpEswE7U2n+4HxwLemLRHYFzlAmQnVChv3YHFdwebJs4QEH+BlBHQn85VLzWDuf1ck/J5z5fP29nM573wHmQPP2kWRdFuSw1hKavJstFGR3Obu8ZdWFHRAIpwKB3DTp42xtaHIpA6wosjdClwBx/Srpux3eIJ4UZFHWP6Sx8=; Message-ID: <karawilliams@example.com> X-YMail-OSG: cFI3D_4VM1mr4ATNgz4Rpe1iUjqCC2wRvXYys.BX_15mzEOAE4HwCJ4zh9WM8AhB4vTKt2MHmQn01lVH4xwKHiO9b6hoQoo65lag7sGXByovtZ7x4ENgUJVjalKQxreBd50q47fr8g05GKpf9.oUafWshA-- Received: from [83.161.120.155] by web32407.mail.mud.yahoo.com via HTTP; Mon, 16 Mar 2009 14:36:02 PDT X-Mailer: YahooMailWebService/0.7.289.1 Date: Mon, 16 Mar 2009 14:36:02 -0700 (PDT) From: Raj <karawilliams@example.com> Reply-To: karawilliams@example.com Subject: Newbee - hierarchical caching and getMatching method To: karawilliams@example.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1712911546-1237239362=:4734" X-Virus-Checked: Checked by ClamAV on apache.org --0-1712911546-1237239362=:4734 Content-Type: text/plain; charset=us-ascii Hello All, I am trying to use hierarchical storage using JCS. I have added objects to cache with following code. testCache.put ("A:1:a", object1); testCache.put ("A:1:b", object2); testCache.put ("A:2:a", object3); I looking to get the first two objects using the following code Map map = testCache.getMatching("A:1:"); This is returning empty map. Thought it would do a pattern matching with begins with and use colon as separator, as per the JCS web page? However this does return a one item, as it should: Map map = testCache.getMatching("A:1:a"); What am i missing?, does matching only match exact? please let me know. Thanks in advance, Raj --0-1712911546-1237239362=:4734-- From jcs-userskarawilliams@example.com Mon Mar 16 23:27:32 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 43467 invoked from network); 16 Mar 2009 23:27:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 16 Mar 2009 23:27:32 -0000 Received: (qmail 20124 invoked by uid 500); 16 Mar 2009 23:27:31 -0000 Delivered-To: karawilliams@example.com Received: (qmail 20105 invoked by uid 500); 16 Mar 2009 23:27:31 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 20094 invoked by uid 99); 16 Mar 2009 23:27:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 16:27:31 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of karawilliams@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2009 23:27:24 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <karawilliams@example.com>) id 1LjMD1-0000KY-7F for karawilliams@example.com; Mon, 16 Mar 2009 16:27:03 -0700 Message-ID: <karawilliams@example.com> Date: Mon, 16 Mar 2009 16:27:03 -0700 (PDT) From: cj22 <karawilliams@example.com> To: karawilliams@example.com Subject: Problem with Update Disk Caching Pattern MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: karawilliams@example.com X-Virus-Checked: Checked by ClamAV on apache.org Hello, So I recently switch the disk caching pattern to UPDATE, and this caused serious cache inconsistencies. It looks like if the key already exists in the disk cache, an update does not go to disk. We are using JCS to cache rows from a database as java objects. If data changes through our server, the new row gets re-put into the cache. So I am wondering, is this a bug? or am I completely mis-using JCS? I assume I could solve this by removing before each put, but that is a lot of code to update and would be rather inefficient. currently using version: jcs-83.161.120.155-RC.jar JCS has been working great for us for several years now in this fashion, so I thank all who worked on it for a great tool! Thanks for any advice, -Chris -- View this message in context: http://www.nabble.com/Problem-with-Update-Disk-Caching-Pattern-tp22549721p22549721.html Sent from the JCS - Users mailing list karawilliams@example.com. --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From jcs-userskarawilliams@example.com Tue Mar 17 10:26:06 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 44251 invoked from network); 17 Mar 2009 10:26:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 17 Mar 2009 10:26:06 -0000 Received: (qmail 22905 invoked by uid 500); 17 Mar 2009 10:26:06 -0000 Delivered-To: karawilliams@example.com Received: (qmail 22880 invoked by uid 500); 17 Mar 2009 10:26:06 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 22869 invoked by uid 99); 17 Mar 2009 10:26:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 03:26:05 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of karawilliams@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 10:25:56 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <karawilliams@example.com>) id 1LjWUJ-0002BG-Gv for karawilliams@example.com; Tue, 17 Mar 2009 03:25:35 -0700 Message-ID: <karawilliams@example.com> Date: Tue, 17 Mar 2009 03:25:35 -0700 (PDT) From: Yaswanth <karawilliams@example.com> To: karawilliams@example.com Subject: Re: Implementing Remote Cache using JCS . In-Reply-To: <karawilliams@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: karawilliams@example.com References: <karawilliams@example.com> <1237227133.27497.331.camel@niall-dell> <karawilliams@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, Yeah .. initially i was not using any logging configuration .. but now when i configured log4j and set to INFO, it worked very well .. Thanks for the suggestion.. Thanks Yaswanth Aaron Smuts wrote: > > > You should expect to see single ms. latency from the remote server. It's > extremely fast. I can typically get data from mysql behind the RMI remote > cache to the client in less than 10 ms. > > Make sure that the log level is higher than debug. Only run at info or > above. > > Other than that, I can't tell you much. I don't have enough information. > > Perhaps your machine is overloaded. > > Aaron > > > --- On Mon, 3/16/09, Niall Gallagher <karawilliams@example.com> wrote: > >> From: Niall Gallagher <karawilliams@example.com> >> Subject: Re: Implementing Remote Cache using JCS . >> To: "JCS Users List" <karawilliams@example.com> >> Date: Monday, March 16, 2009, 11:12 AM >> Hi Yaswanth, >> >> "my average retrieval time is 2.3 Seconds" >> -is that 2.3 seconds per object or 2.3 seconds per 10,000 >> objects? >> >> Whichever the case- I'd not expect retrieval time from >> a remote cache >> server to be faster than say retrieving from a database, if >> that's what >> you're comparing with. The point of JCS is not to >> compete with database >> drivers in network round-trip retrieval speed. The point is >> to eliminate >> network round trips. >> >> If, in your test, one server is putting an object into the >> cache and you >> are timing how long it takes the other server to retrieve >> it, you won't >> be getting real-world statistics. You should time how long >> it would take >> the second server to retrieve the same object multiple >> times, which is >> what your app would probably be doing in production (if >> your data is >> cacheable i.e. is repeatedly read more than once). Also you >> should have >> a warm-up run in your test because initialising the cache >> takes a couple >> of seconds but only happens at application startup. >> >> The remote cache server is not a distributed cache by >> itself - it exists >> to *coordinate* the distributed cache. The JCS client >> libraries which >> you'll have in each application connect to and retrieve >> objects from the >> remote cache server and then keep copies in local RAM to >> allow them to >> avoid network round trips when they next need the same >> data. The remote >> cache in the meantime keeps each client in sync with other >> clients by >> notifying clients when data changes. >> >> If n=retrieval iteration, you'll probably find that >> when >> >> n=1, timetaken=0.5 seconds >> n=2, timetaken=0.00004 seconds >> n=3, timetaken=0.00004 seconds >> ..and so on. >> >> Then you need to run the same test, but this time comparing >> time taken >> when you repeatedly read from a busy database. Databases >> have built-in >> caches, so for n=2 you'll see a slight improvement, but >> it will still be >> at least hundreds of times slower than retrieving from >> local RAM. >> >> Kind regards, >> >> Niall >> >> >> On Mon, 2009-03-16 at 08:58 -0700, Yaswanth wrote: >> >> > Hi, >> > >> > I am trying to implement Remote Cache using JCS. >> > >> > Below is my Server and Client Code. Here are my >> > >> http://www.nabble.com/file/p22541185/remote.cache.server.ccf >> Server and >> > >> http://www.nabble.com/file/p22541185/remote.cache.client.ccf >> Client Cache >> > configuration files. >> > >> > My ServerCode : >> > RemoteCacheServerFactory.main(new >> String[]{"/remote.cache.server.ccf"}); >> > >> > My Client1 Code : >> > JCS.setConfigFilename( >> "/remote.cache.client.ccf" ); >> > JCS cache = JCS.getInstance( "testCache" ); >> > cache.put("Key"+i, "Value"+i); // >> So many times.. While loop >> > >> > My Client2 Code : >> > JCS.setConfigFilename( >> "/remote.cache.client.ccf" ); >> > JCS cache = JCS.getInstance( "testCache" ); >> > cache.get("Key"+i); // So many times. While >> loop >> > >> > >> > I am running a JCS Remote Server and Starting Two >> Remote Clients. >> > >> > Using One client i am adding 10K Objects into cache >> and after that i am >> > using using another client i am retrieving them. At >> this time my average >> > retrieval time is 2.3 Seconds. >> > >> > When i rerun the test case with 100K objects . My >> average retrieval rate is >> > 302 Seconds. >> > >> > I observed that my retrieval rates are very slow, >> which i think shouldn't >> > be. Can anyone point out where the problem is ? >> > >> > Thanks, >> > Yaswanth > > --------------------------------------------------------------------- > To unsubscribe, e-mail: karawilliams@example.com > For additional commands, e-mail: karawilliams@example.com > > > -- View this message in context: http://www.nabble.com/Implementing-Remote-Cache-using-JCS-.-tp22541185p22556218.html Sent from the JCS - Users mailing list karawilliams@example.com. --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From jcs-userskarawilliams@example.com Tue Mar 17 10:28:59 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 46496 invoked from network); 17 Mar 2009 10:28:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 17 Mar 2009 10:28:59 -0000 Received: (qmail 28780 invoked by uid 500); 17 Mar 2009 10:28:59 -0000 Delivered-To: karawilliams@example.com Received: (qmail 28604 invoked by uid 500); 17 Mar 2009 10:28:58 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 28592 invoked by uid 99); 17 Mar 2009 10:28:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 03:28:58 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of karawilliams@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 10:28:51 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <karawilliams@example.com>) id 1LjWX8-0002JE-NX for karawilliams@example.com; Tue, 17 Mar 2009 03:28:30 -0700 Message-ID: <karawilliams@example.com> Date: Tue, 17 Mar 2009 03:28:30 -0700 (PDT) From: Yaswanth <karawilliams@example.com> To: karawilliams@example.com Subject: Re: Implementing Remote Cache using JCS . In-Reply-To: <1237227133.27497.331.camel@niall-dell> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: karawilliams@example.com References: <karawilliams@example.com> <1237227133.27497.331.camel@niall-dell> X-Virus-Checked: Checked by ClamAV on apache.org it was 2.3 seconds for single object retrieval . Anyways that is solved by configuring log4j properly .. now one average it is taking less than 1 millisecond. Thanks Yaswanth Niall Gallagher wrote: > > Hi Yaswanth, > > "my average retrieval time is 2.3 Seconds" > -is that 2.3 seconds per object or 2.3 seconds per 10,000 objects? > > Whichever the case- I'd not expect retrieval time from a remote cache > server to be faster than say retrieving from a database, if that's what > you're comparing with. The point of JCS is not to compete with database > drivers in network round-trip retrieval speed. The point is to eliminate > network round trips. > > If, in your test, one server is putting an object into the cache and you > are timing how long it takes the other server to retrieve it, you won't > be getting real-world statistics. You should time how long it would take > the second server to retrieve the same object multiple times, which is > what your app would probably be doing in production (if your data is > cacheable i.e. is repeatedly read more than once). Also you should have > a warm-up run in your test because initialising the cache takes a couple > of seconds but only happens at application startup. > > The remote cache server is not a distributed cache by itself - it exists > to *coordinate* the distributed cache. The JCS client libraries which > you'll have in each application connect to and retrieve objects from the > remote cache server and then keep copies in local RAM to allow them to > avoid network round trips when they next need the same data. The remote > cache in the meantime keeps each client in sync with other clients by > notifying clients when data changes. > > If n=retrieval iteration, you'll probably find that when > > n=1, timetaken=0.5 seconds > n=2, timetaken=0.00004 seconds > n=3, timetaken=0.00004 seconds > ..and so on. > > Then you need to run the same test, but this time comparing time taken > when you repeatedly read from a busy database. Databases have built-in > caches, so for n=2 you'll see a slight improvement, but it will still be > at least hundreds of times slower than retrieving from local RAM. > > Kind regards, > > Niall > > > On Mon, 2009-03-16 at 08:58 -0700, Yaswanth wrote: > >> Hi, >> >> I am trying to implement Remote Cache using JCS. >> >> Below is my Server and Client Code. Here are my >> http://www.nabble.com/file/p22541185/remote.cache.server.ccf Server and >> http://www.nabble.com/file/p22541185/remote.cache.client.ccf Client >> Cache >> configuration files. >> >> My ServerCode : >> RemoteCacheServerFactory.main(new String[]{"/remote.cache.server.ccf"}); >> >> My Client1 Code : >> JCS.setConfigFilename( "/remote.cache.client.ccf" ); >> JCS cache = JCS.getInstance( "testCache" ); >> cache.put("Key"+i, "Value"+i); // So many times.. While loop >> >> My Client2 Code : >> JCS.setConfigFilename( "/remote.cache.client.ccf" ); >> JCS cache = JCS.getInstance( "testCache" ); >> cache.get("Key"+i); // So many times. While loop >> >> >> I am running a JCS Remote Server and Starting Two Remote Clients. >> >> Using One client i am adding 10K Objects into cache and after that i am >> using using another client i am retrieving them. At this time my average >> retrieval time is 2.3 Seconds. >> >> When i rerun the test case with 100K objects . My average retrieval rate >> is >> 302 Seconds. >> >> I observed that my retrieval rates are very slow, which i think shouldn't >> be. Can anyone point out where the problem is ? >> >> Thanks, >> Yaswanth > > > -- View this message in context: http://www.nabble.com/Implementing-Remote-Cache-using-JCS-.-tp22541185p22556264.html Sent from the JCS - Users mailing list karawilliams@example.com. --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From jcs-userskarawilliams@example.com Wed Mar 18 17:36:00 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 54103 invoked from network); 18 Mar 2009 17:35:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 18 Mar 2009 17:35:58 -0000 Received: (qmail 66287 invoked by uid 500); 18 Mar 2009 17:35:58 -0000 Delivered-To: karawilliams@example.com Received: (qmail 66250 invoked by uid 500); 18 Mar 2009 17:35:57 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 66239 invoked by uid 99); 18 Mar 2009 17:35:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Mar 2009 10:35:57 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO web38701.mail.mud.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 18 Mar 2009 17:35:48 +0000 Received: (qmail 81576 invoked by uid 60001); 18 Mar 2009 17:35:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1237397727; bh=3RknmONlIzCyj/JhOupqXbO3uZpbidJFd7aNHgukhmc=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=R9mPcl3LATl0lnuNhKZ1DQTPHzCFSq1vhuTQ1uvQMibwklEapYxkRwKeTXnqpOiCONlVIGAEmQhvSffV6kfpl99E9wjEtO69/e2dh6qDCT3JZnvLcGYpmFV0Sd2QpCoBZafaAq6aaf1tHQL+Ai8u34EZV3QqAMBFXg6USAULjqc= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=As7CjOvkmnEfvAnexF3eCpLwjT4M7zhsFJCQwgFpYeYEZjARoQHSrQI3OycwKI3zjHKetT4NzA1B8bIUa4IIXNlNJoxOGuMCzycx/XuJagVBWMQn3SFWXxLCPRZ36A3lTQGlJTgre4tlgABLIS02910B4vi/1jw8yqbODkOckSM=; Message-ID: <{{EMAIL+PHONE}}> X-YMail-OSG: SWCemkwVM1nZ1gGRo7wDMXmYGsr1ALHkBqAwqGxoEQjiX5ZUsluQttzkySiYrZMZBjO7LWcltcGid.A1l8D8LLjwSpy0dEKrh_IFuf5N3mwqgJS25ELuQYAyQjW.xQfksng9oFKz9odnGgBEgX80IJPi48K47YRoYavsj0bTqWv82H6zbKLmWIvjgAxnjgizTCrEJE2QrhIn9Q1wELRa2HdUUQqwMyY- Received: from [83.161.120.155] by web38701.mail.mud.yahoo.com via HTTP; Wed, 18 Mar 2009 10:35:26 PDT X-Mailer: YahooMailClassic/5.1.20 YahooMailWebService/0.7.289.1 Date: Wed, 18 Mar 2009 10:35:26 -0700 (PDT) From: Aaron Smuts <karawilliams@example.com> Subject: Re: Newbee - hierarchical caching and getMatching method To: JCS Users List <karawilliams@example.com>, karawilliams@example.com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org The getMatching API has nothing to do with the colon convention. =0A=0AThe= getMatching API allows you to use string pattern matching to retrieve item= s. Your keys have to be strings to use it. It even works with the JBDC di= sk cache, if you only use patterns that can be converted into like queries.= =0A=0AThe colon convention simply allows you to remove items with string ke= ys that match the substring. =0A=0AI suppose we need a removeMatching meth= od as well.=0A=0AAaron=0A=0A--- On Mon, 3/16/09, Raj <karawilliams@example.com> wro= te:=0A=0A> From: Raj <karawilliams@example.com>=0A> Subject: Newbee - hierarchical = caching and getMatching method=0A> To: karawilliams@example.com=0A> Dat= e: Monday, March 16, 2009, 2:36 PM=0A> Hello All,=0A> =0A> I am trying to u= se hierarchical storage using JCS.=0A> =0A> I have added objects to cache w= ith following code.=0A> testCache.put ("A:1:a", object1);=0A> testCache.put= ("A:1:b", object2);=0A> testCache.put ("A:2:a", object3);=0A> =0A> I looki= ng to get the first two objects using the following=0A> code=0A> Map map = =3D testCache.getMatching("A:1:");=0A> =0A> This is returning empty map. Th= ought it would do a pattern=0A> matching with begins with=0A> and use colon= as separator, as per the JCS web page?=0A> =0A> However this does return a= one item, as it should:=0A> Map map =3D testCache.getMatching("A:1:a");=0A= > =0A> What am i missing?, does matching only match exact? please=0A> let m= e know. =0A> =0A> Thanks in advance,=0A> Raj=0A> =0A> =0A> =A0 =A0 =A0 --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From jcs-userskarawilliams@example.com Thu Mar 19 09:17:30 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 6616 invoked from network); 19 Mar 2009 09:17:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 19 Mar 2009 09:17:30 -0000 Received: (qmail 868 invoked by uid 500); 19 Mar 2009 09:17:28 -0000 Delivered-To: karawilliams@example.com Received: (qmail 857 invoked by uid 500); 19 Mar 2009 09:17:28 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 836 invoked by uid 99); 19 Mar 2009 09:17:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 02:17:28 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of karawilliams@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 09:17:11 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <karawilliams@example.com>) id 1LkEMs-0007NP-6w for karawilliams@example.com; Thu, 19 Mar 2009 02:16:50 -0700 Message-ID: <karawilliams@example.com> Date: Thu, 19 Mar 2009 02:16:50 -0700 (PDT) From: Yaswanth <karawilliams@example.com> To: karawilliams@example.com Subject: Does Remote Client gets acknowledgment from the Remote Cache for puts? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: karawilliams@example.com X-Virus-Checked: Checked by ClamAV on apache.org Hi , I have implemented Remote Cache with two clients and one Server. First Clients puts an Object into the Cache and sends the key over JMS to the second Client. Using which Second Client gets that Object from the Remote Cache . This entire thing is working for me on low loads .. When i load the system. I observed that Second Client retrieves few null messages from the remote cache.. My guess is that it would be only possible if the Second Client is trying to retrieve the Object even before the First Client puts into remote Cache. Is there anything(something like acknowledgments) with which i can ensure in the Fist Client that i send the JMS Message only after my object is kept in the remote cache. Does a Remote Cache send back the acknowledgment to the clients when the Object is put into the cache ? These are my Cache Config Files .. http://www.nabble.com/file/p22595967/remote.cache.server.ccf remote.cache.server.ccf http://www.nabble.com/file/p22595967/remote.cache.client.ccf remote.cache.client.ccf Thanks Yaswanth -- View this message in context: http://www.nabble.com/Does-Remote-Client-gets-acknowledgment-from-the-Remote-Cache-for-puts--tp22595967p22595967.html Sent from the JCS - Users mailing list karawilliams@example.com. --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From jcs-userskarawilliams@example.com Thu Mar 19 12:30:41 2009 Return-Path: <jcs-userskarawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 8627 invoked from network); 19 Mar 2009 12:30:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 19 Mar 2009 12:30:41 -0000 Received: (qmail 66097 invoked by uid 500); 19 Mar 2009 12:30:41 -0000 Delivered-To: karawilliams@example.com Received: (qmail 65924 invoked by uid 500); 19 Mar 2009 12:30:40 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:karawilliams@example.com> List-Unsubscribe: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: <jcs-users.jakarta.apache.org> Reply-To: "JCS Users List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 65913 invoked by uid 99); 19 Mar 2009 12:30:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 05:30:40 -0700 X-ASF-Spam-Status: No, hits=2.4
{'source': 'Apache Software Foundation Public Mail Archives'}