Return-Path: Delivered-To: apmail-jakarta-jcs-users-archive@www.apache.org Received: (qmail 48479 invoked from network); 23 Feb 2006 17:15:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Feb 2006 17:15:47 -0000 Received: (qmail 53293 invoked by uid 500); 23 Feb 2006 17:15:46 -0000 Delivered-To: apmail-jakarta-jcs-users-archive@jakarta.apache.org Received: (qmail 53277 invoked by uid 500); 23 Feb 2006 17:15:46 -0000 Mailing-List: contact jcs-users-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JCS Users List" Delivered-To: mailing list jcs-users@jakarta.apache.org Received: (qmail 53266 invoked by uid 99); 23 Feb 2006 17:15:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2006 09:15:46 -0800 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=HTML_10_20,HTML_MESSAGE,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [195.200.26.6] (HELO switchfire.com) (195.200.26.6) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2006 09:15:44 -0800 Received: from 192.168.10.22 ([192.168.10.22]) by sbssrvr1.Switchfire.local ([192.168.10.1]) with Microsoft Exchange Server HTTP-DAV ; Thu, 23 Feb 2006 17:15:22 +0000 Received: from niall-hp by 192.168.10.1; 23 Feb 2006 17:15:22 +0000 Subject: JCS as both local and remote cache? From: Niall Gallagher To: jcs-users@jakarta.apache.org Content-Type: multipart/alternative; boundary="=-ilJzh/B7u+NKkCuyGoo3" Organization: Switchfire Ltd. Date: Thu, 23 Feb 2006 17:15:21 +0000 Message-Id: <1140714921.8228.103.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --=-ilJzh/B7u+NKkCuyGoo3 Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, Can anybody answer the following for me? I have a JBoss server which I want to use as a central point of access to a database. Client machines will only be able to write to the database by calling EJB method on the JBoss machine. Client machines will not hold direct connections to the database themselves. I want the JBoss server to use JCS as a caching layer to sit between all clients and the database. JCS will run inside JBoss. Also, I want client machines to run JCS locally as a local cache, configured to use the JBoss central machine as a remote cache. Client machines will not write to the central cache directly. If they call EJBs on the central JBoss machine to update the database, the central EJBs will update the central cache with the new data at the same time. If clients then try to access data from their local cache, since it is not cached locally, the client-side JCS cache will download it from the central (remote) cache automatically. If clients find that required data is not available locally or centrally, they will call methods on the JBoss machine to have it loaded into the cache. If the JBoss server updates or removes data in the central cache, JCS will automatically issue 'remove' commands to all client caches. So I think this approach will ensure all caches remain in sync almost all of the time (ignoring the intricacies of asynchronous queueing!). My question is: How do I configure the central cache? If a line of code on the central server reads jcs.put("myKey", "myValue"); will the central JCS cache automatically issue remove commands to clients for "myKey"? The central server needs to be configured as a local cache for its own use, but it should also know that it is a remote cache to clients, and therefore needs to issue these remove commands. Any suggestions? By the way, I think JCS is an extremely well written piece of software. Hopefully the recent additions to the JCS website will help it get some more recognition for this, which I think it deserves. --=-ilJzh/B7u+NKkCuyGoo3--