jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Smuts, Aaron" <aaro...@amazon.com>
Subject RE: Newbie: pulling my hair out with remote cache
Date Mon, 09 Aug 2004 15:54:09 GMT
You have the remote server configured to invalidate items on other local caches when something
is put into the originating local cache.  When an item is put in C1 it tells CS, CS then tells
all other registered caches, in this case C2, to remove the item.  The setting is in this
line.  If you don't want this behavior, then set this to false.

 jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true

Having this set to true is recommended for situations where the data on a particular machine
may be somewhat user specific.  There are some case, like this, where you don't want the items
stored in memory to be the same on all machines.  

Cheers,

Aaron


-----Original Message-----
From: David Vismans [mailto:david4@chello.nl] 
Sent: Monday, August 09, 2004 5:13 AM
To: turbine-jcs-dev@jakarta.apache.org
Subject: Newbie: pulling my hair out with remote cache

Hi everyone,

First, JCS looks great! Looking forward to some extensive usage.
However, I have been trying to get the remote cache working for about a week now, and I am
not succeeding.

Here's the setup:

C1 (client 1) pushes an element E in it's local cache.
CS (server) receives (the update of) this object and does store it.

C2 (client 2) is able to retrieve the cached element E from CS.

so far so good,

but when C1 repetitively updates E (named "test") with a random integer value,
C2 is not notified of the new value for this key. CS DOES receive the element, but does not
propagate to C2.

I have read through every example and also mailinglist messages I still have not found the
solution.

I got JCS from the CVS and RMI is working, I created the stubs etc.
I am using the latest jdk on windows xp home edition.

Perhaps an interesting detail: I did not get the lateral cache to propagate either (there
is no firewall running). All clients and the server run on the same machine.

If anyone could help me out here I would really appreciate it!

Thanks in advance,

David

Below are my configuration files:

C1:
# PRE-DEFINED CACHE REGIONS   
jcs.region.Tasks=DC,RFailover
jcs.region.Tasks.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt
ributes
jcs.region.Tasks.cacheattributes.MaxObjects=1000
jcs.region.Tasks.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m
emory.lru.LRUMemoryCache
jcs.region.Tasks.cacheattributes.UseMemoryShrinker=false
jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=60
jcs.region.Tasks.elementattributes=org.apache.jcs.engine.ElementAttribut
es
jcs.region.Tasks.elementattributes.IsEternal=false
jcs.region.Tasks.elementattributes.IdleTime=1800
jcs.region.Tasks.elementattributes.IsSpool=true
jcs.region.Tasks.elementattributes.IsRemote=true
jcs.region.Tasks.elementattributes.IsLateral=false

jcs.system.groupIdCache=jcs.system.groupIdCache.cacheattributes=org.apac
he.jcs.engine.CompositeCacheAttributes
jcs.system.groupIdCache.cacheattributes.MaxObjects=10000
jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e
ngine.memory.lru.LRUMemoryCache

# Remote RMI Cache set up to failover
jcs.auxiliary.RFailover=org.apache.jcs.auxiliary.remote.RemoteCacheFacto
ry
jcs.auxiliary.RFailover.attributes=org.apache.jcs.auxiliary.remote.Remot
eCacheAttributes
jcs.auxiliary.RFailover.attributes.RemoteHost=localhost
jcs.auxiliary.RFailover.attributes.RemotePort=2099
jcs.auxiliary.RFailover.attributes.LocalPort=2103
#jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:2099
jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true
jcs.auxiliary.RFailover.attributes.GetOnly=false
#jcs.auxiliary.RFailover.attributes.RemoteTypeName=REMOTE

# AVAILABLE AUXILIARY CACHES   
jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF
actory
jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe
dDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=C:/Temp/diskcachelocal
jcs.auxiliary.DC.attributes.maxKeySize=1000

------------------
C2:

# PRE-DEFINED CACHE REGIONS   
jcs.region.Tasks=DC,RFailover
jcs.region.Tasks.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt
ributes
jcs.region.Tasks.cacheattributes.MaxObjects=1000
jcs.region.Tasks.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m
emory.lru.LRUMemoryCache
jcs.region.Tasks.cacheattributes.UseMemoryShrinker=false
jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=60
jcs.region.Tasks.elementattributes=org.apache.jcs.engine.ElementAttribut
es
jcs.region.Tasks.elementattributes.IsEternal=false
jcs.region.Tasks.elementattributes.IdleTime=1800
jcs.region.Tasks.elementattributes.IsSpool=true
jcs.region.Tasks.elementattributes.IsRemote=true
jcs.region.Tasks.elementattributes.IsLateral=false

jcs.system.groupIdCache=jcs.system.groupIdCache.cacheattributes=org.apac
he.jcs.engine.CompositeCacheAttributes
jcs.system.groupIdCache.cacheattributes.MaxObjects=10000
jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e
ngine.memory.lru.LRUMemoryCache

# Remote RMI Cache set up to failover
jcs.auxiliary.RFailover=org.apache.jcs.auxiliary.remote.RemoteCacheFacto
ry
jcs.auxiliary.RFailover.attributes=org.apache.jcs.auxiliary.remote.Remot
eCacheAttributes
jcs.auxiliary.RFailover.attributes.RemoteHost=localhost
jcs.auxiliary.RFailover.attributes.RemotePort=2099
jcs.auxiliary.RFailover.attributes.LocalPort=2102
#jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:2099
jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true
#jcs.auxiliary.RFailover.attributes.RemoteTypeName=REMOTE
jcs.auxiliary.RFailover.attributes.GetOnly=false
#jcs.auxiliary.RFailover.attributes.GetOnly=false
#jcs.auxiliary.RFailover.attributes.RemoteServiceName=RemoteCache

# AVAILABLE AUXILIARY CACHES   
jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF
actory
jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe
dDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=C:/Temp/updateclient1
jcs.auxiliary.DC.attributes.maxKeySize=1000

--------------
CS:
registry.host=localhost
registry.port=2099
remote.cache.service.port=2099
remote.tomcat.on=false
remote.cluster.LocalClusterConsistency=true

jcs.system.groupIdCache=DC
jcs.system.groupIdCache.cacheattributes=org.apache.jcs.engine.CompositeC
acheAttributes
jcs.system.groupIdCache.cacheattributes.MaxObjects=10000
jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e
ngine.memory.lru.LRUMemoryCache
jcs.system.groupIdCache.elementattributes=org.apache.jcs.engine.ElementA
ttributes
jcs.system.groupIdCache.elementattributes.IsEternal=true
jcs.system.groupIdCache.elementattributes.MaxLifeSeconds=3600
jcs.system.groupIdCache.elementattributes.IdleTime=1800
jcs.system.groupIdCache.elementattributes.IsSpool=true
jcs.system.groupIdCache.elementattributes.IsRemote=false
jcs.system.groupIdCache.elementattributes.IsLateral=false

# DEFAULT CACHE REGION   
jcs.default=DC
jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttribut
es
jcs.default.cacheattributes.MaxObjects=10000
jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory
.lru.LRUMemoryCache
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLifeSeconds=3600
jcs.default.elementattributes.IdleTime=1800
jcs.default.elementattributes.IsSpool=true
jcs.default.elementattributes.IsRemote=true
jcs.default.elementattributes.IsLateral=false

# PRE-DEFINED CACHE REGIONS   
jcs.region.Tasks=DC
jcs.region.Tasks.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt
ributes
jcs.region.Tasks.cacheattributes.MaxObjects=1000
jcs.region.Tasks.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m
emory.lru.LRUMemoryCache
jcs.region.Tasks.cacheattributes.UseMemoryShrinker=false
jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=60
jcs.region.Tasks.elementattributes=org.apache.jcs.engine.ElementAttribut
es
jcs.region.Tasks.elementattributes.IsEternal=true
jcs.region.Tasks.elementattributes.IdleTime=1800
jcs.region.Tasks.elementattributes.IsSpool=true
jcs.region.Tasks.elementattributes.IsRemote=true
jcs.region.Tasks.elementattributes.IsLateral=false

# AVAILABLE AUXILIARY CACHES   
jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF
actory
jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe
dDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=C:/Temp/diskcacheremote/
jcs.auxiliary.DC.attributes.maxKeySize=100000
jcs.auxiliary.DC.elementattributes=org.apache.jcs.engine.ElementAttribut
es
jcs.auxiliary.DC.elementattributes.IsEternal=true
jcs.auxiliary.DC.elementattributes.IdleTime=1800
jcs.auxiliary.DC.elementattributes.IsSpool=true
jcs.auxiliary.DC.elementattributes.IsRemote=true
jcs.auxiliary.DC.elementattributes.IsLateral=false


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org


Mime
View raw message