Return-Path: Delivered-To: apmail-jakarta-turbine-jcs-user-archive@www.apache.org Received: (qmail 26283 invoked from network); 7 Mar 2005 01:05:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Mar 2005 01:05:34 -0000 Received: (qmail 64982 invoked by uid 500); 7 Mar 2005 01:05:34 -0000 Delivered-To: apmail-jakarta-turbine-jcs-user-archive@jakarta.apache.org Received: (qmail 64964 invoked by uid 500); 7 Mar 2005 01:05:34 -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 64951 invoked by uid 99); 7 Mar 2005 01:05:33 -0000 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,FORGED_YAHOO_RCVD X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from web30504.mail.mud.yahoo.com (HELO web30504.mail.mud.yahoo.com) (68.142.200.117) by apache.org (qpsmtpd/0.28) with SMTP; Sun, 06 Mar 2005 17:05:33 -0800 Received: (qmail 48099 invoked by uid 60001); 7 Mar 2005 01:05:31 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=LWhmV2oGDVRwKyQViO1cxBaIO9mQn9NcTyycnxEDlDeuiRL9zo0nxDuehP8HqyQC/qWz91t1YlQshQO5ZRQCOymuvUDYfYUC2rFvbDgYjKRO4ZY4GTKjIBOVr7uYX+u/60kMbcuNvoIvPajkeYwXkG/aOGT+M9b26VaFm8OSyTo= ; Message-ID: <20050307010531.48097.qmail@web30504.mail.mud.yahoo.com> Received: from [67.168.40.41] by web30504.mail.mud.yahoo.com via HTTP; Sun, 06 Mar 2005 17:05:31 PST Date: Sun, 6 Mar 2005 17:05:31 -0800 (PST) From: Aaron Smuts Subject: Re: JCS Setup Questions To: Turbine JCS Users List , drdan321-nospam@yahoo.com In-Reply-To: <20050307001622.76295.qmail@web41412.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --- Daniel Rosenbaum wrote: > Thanks Aaron for your insight. You answered some of > my > questions, and I now have a better picture how to > set this all > up, but the following questions still remain. Could > you or > someone else please be kind enough to respond? > > 1) How does the "listener" get started for a lateral > cache, what > sets up binding of the port etc. Is it a separate > process or > does it start a new thread when the cache is > initialized in the > web app? > If you configure a region to use a lateral cache. The listener will startup when the cache is initialized. The first time you get any region or call configure, all regions are configured. > 2) Does the lateral cache broadcast change messages > right away, > or is there a thread that wakes up periodically to > send > messages? In other words, is there ever a > possibility server B > would serve stale data after the object was changed > on server A, > simply because the thread did not wake up yet to > propogate the > change? > All events to disk, laterals, remotes, etc are put into event queues. There are two options for the queues. The standard option is that every queue has its own devoted worker thread, which dies after 60 seconds of inactivity and is started again when something gets put in the queue. While alive it tries tog et stuff out of the queue. If you put it in, it will be pulled out as soon as possible. The otehr model is to configure a thread pool to be used by the queue. (I won't tell you how to do this right now. You don't really need to know.) > 3) Similar to (2), does the lateral cache have a > listener, or is > it the type that wakes up periodically to check if > there are > messages waiting? Put another way, does it have a > push or a > pull model? > Incoming messages are queued just like outgoing. The are processed when they come in. > 4) Is there a way to set up the lateral caches to > only send > invalidate messages but not serialize the objects > and send them? > I think so. The remote cache has this. I'll have to check. It is failry easy to add the feature if not. > 5) I will be using this cache with Hibernate. For > some reason > the Hibernate project deprecated the use of JCS as a > secondary > cache, and the new Hibernate 3.0 release does not > even include > the JCS plugin at all, but I see no reason why not > to, with all > the bug fixes lately. Does anyone know why not to? They deprecated it based on bugs in a 2 or 3 year old version. (I'll hold my tongue here.) > The only > reason I saw not to use the JCS distributed cache > functionality > with Hibernate is since JCS does not support locking > and > transactions, but I am not so concerned about this. It would be madness to use jboss cache in a big cluster in locking mode. Using jgroups for distributed locking is not scallable. It also adds all sorts of complexity for puts. Each object is broken down into primitive elements. Using AOP they intercept all changes to the objects inteh cache, so if you only modify a small field of a large object, just that field needs to be sent over the wire. This solves an uncommon problem in a way that has costs for the common situation where you have a modest size object. Also, if you need that degree of data integrity, you don't need a cache, you need a database. > Is there > any other reason? (By the way, since the plugin > code no longer > exists on the new version of Hibernate, perhaps it > should be > moved to be part of the jcs code base so JCS could > continue to > be used with Hibernate?) You write the plugin, send it to us, and I'll put it in a plugin jar along with the struts plugin. > > 6) New question: the config idea with JNDI is > interesting but I > am not sure it is possible using Weblogic > clustering. With > Weblogic clustering you would deploy a war file on > just one > server and Weblogic would then automatically deploy > it on all > the servers in the cluster for you. There is only > one place to > configure all the servers. I am not sure if there > is a way to > specify a different value for each server, and you > would > actually have only one console. Does anyone have > any experience > with this, and know of a way to specify a different > value for > each node in a cluster? > You can definitely set different values for different servers. Either way, I think the remote cache is a better option. It solves your configuration problems, since all the local caches can have the same settings. It does require that you run a separate process, but it is a better model overall. Aaron > Thanks in advance, > Daniel > > > --- Aaron Smuts wrote: > > > Hi Daniel. > > > > A removeAll sends one message, not a message for > each > > item. > > > > Jgroups is fine, but it is slower than the otehr > > options. > > > > I'd use tcp lateral connections or the remote rmi > > server. > > > > If you use the tcp lateral, then you need to > specify > > the servers a cache should connect to. If you > have 3 > > servers, A, B, and C, then A should point to B and > C, > > B should point to A and C, . . . > > > > The problem is that this would require that you > have a > > different war for each app. > > > > There is asolution. Use JNDI and a startup > servlet. > > Set the server list as a value in applicaiton > context > > through the container. Make a startup servlet > that > > configures JCS based on a properties object. Load > the > > cache.ccf file and change the values you need. > Then > > configure JCS with this. use the > > CompositeCacheManager. > > > > This way you can deploy the same war to multiple > > servers. > > > > > > Aaron > > > > --- Daniel Rosenbaum > > wrote: > > > > > Hello, > > > > > > JCS seems to have come a long way since about a > year > > > ago. Could > > > I assume most of the bugs were fixed that the > > > Hibernate project > > > was reporting? > > > > > > Anyhow, I am thinking about using JCS for it's > > > clustered cache > > > capability. I hope the community would not mind > > > giving me a few > > > pointers how to set this up properly, and some > > > insight as to > > > what configuration options are best for me. > > > > > > I have a web app running on Weblogic that is > > > currently clustered > > > on two servers but may go up to 5 servers or > more. > > > The data I > > > cache is mostly read only but changes > occasionally. > > > I don't > > > care so much about sharing data between servers > but > > > am more > > > concerned about not serving stale data, so I > would > > > be happy just > > > to send an invalidate message to the rest of the > > > servers on an > > > element change so they would not serve stale > data. > > > > > > I am trying to make heads or tales of the docs > but > > > find them > > > difficult to understand. As far as I could tell > > > though a > > > lateral cache would suit my needs best. > > > > > > 1) Since I am not so concerned about sharing the > > > data I figure a > > > remote cache is not so important, plus it seems > for > > > a remote > > > cache I would need to start another process > besides > > > for the web > > > servers. This seems like overkill. Am I > correct > > > though that > > > for a lateral cache I would not need to start > > > another process? > > > But if so I am confused how the "listener" gets > > > started for a > > > lateral cache, what sets up binding of the port > etc. > > > The doc > > > was not clear on this. > > > > > > 2) I am unclear how I would specify servers in > the > === message truncated === --------------------------------------------------------------------- To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org