I'm working with an application in c/s mode, here is the requirements:
Client: N clients, read-only cache, load data from cluster or server db
Server: 1 or 2 serves, lazy-load cache from db, remove-node.
It was said that the server update and share the cache data, and the client read-share
cache from server. The server side loader was responsible to load data from db. the db is
clustered.
2 issues i met here:
1: the 2 server cache both response on client cache query even singletonStore is enabled.
because they are query the same clustered db, is it possible to restrict only the active
loader response to read access?
2: the client won't read data from server loader if the client is not configured as a
buddy member.
==================================
Server configuration:
<?xml version="1.0" encoding="UTF-8"?>
| <jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xmlns="urn:jboss:jbosscache-core:config:3.1">
|
| <transaction
|
transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"
/>
|
| <eviction wakeUpInterval="5000">
| <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
eventQueueSize="200000">
| <property name="maxNodes" value="5000" />
| <property name="timeToLive" value="1000000" />
| </default>
| </eviction>
|
| <clustering mode="i" clusterName="JBossCache-Cluster">
| <buddy enabled="true"
poolName="myBuddyPoolReplicationGroup"
communicationTimeout="2000">
| <dataGravitation auto="true" removeOnFind="false"
searchBackupTrees="false"/>
| <locator
class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
| <properties>
| numBuddies = 1
| ignoreColocatedBuddies = true
| </properties>
| </locator>
| </buddy>
| <jgroupsConfig configFile="udp.xml" />
| </clustering>
|
| <loaders passivation="false" shared="true">
| <loader class="org.steeven.MyCacheLoader"
| async="false" fetchPersistentState="false"
ignoreModifications="true"
| purgeOnStartup="false">
| <properties />
| </loader>
| </loaders>
| </jbosscache>
|
Client configuration:
<?xml version="1.0" encoding="UTF-8"?>
| <jbosscache xmlns="urn:jboss:jbosscache-core:config:3.0">
| <eviction wakeUpInterval="5000">
| <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
| eventQueueSize="200000">
| <property name="maxNodes" value="5000" />
| <property name="timeToLive" value="1000000" />
| </default>
| </eviction>
|
| <clustering mode="i" clusterName="JBossCache-Cluster">
| <buddy enabled="true" poolName="myBuddyPoolReplicationGroup"
| communicationTimeout="2000">
| <dataGravitation auto="true" removeOnFind="false"
| searchBackupTrees="false" />
| <locator
class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
| <properties>
| numBuddies = 1
| ignoreColocatedBuddies = true
| </properties>
| </locator>
| </buddy>
| <jgroupsConfig configFile="udp.xml" />
| </clustering>
| <loaders passivation="false" shared="false">
| <loader class="org.jboss.cache.loader.ClusteredCacheLoader"
| async="false" fetchPersistentState="false"
ignoreModifications="false">
| <properties>
| timeout=500
| </properties>
| </loader>
| </loaders>
| </jbosscache>
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250550#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...