3 Cache Servers - Reference Documentation
Authors: Jeff Brown, Graeme Rocher
Version: 1.0.0.BUILD-SNAPSHOT
Table of Contents
3 Cache Servers
Gemfire supports a client / server mode for caching which can unlock some of the nicer Gemfire features including:- Grid computing
- Continuous querying
- Advanced data partitioning
start-cache-server
command.grails start-cache-server server1
stop-cache-server
command:grails stop-cache-server server1
grails start-cache-server server1 --locators=localhost[4111] --port=41112 --mcast-port=0
start-locator
command:grails start-locator
grails start-locator --port=4111
3.1 Cache Server Clients
Once you have some cache servers up and running you need to configure the Grails application to act as a client to the servers.// grails-app/conf/Config.groovy grails.gemfire.servers = { myServer { properties = ['log-level': 'warning'] pool { addServer "localhost", 4111 setMinConnections 1 setMaxConnections 20 setRetryAttempts 10 setSubscriptionEnabled true } } }
// grails-app/conf/Config.groovy grails.gemfire.servers = { myServer { properties = ['log-level': 'warning'] pool { addLocator "localhost", 4111 setMinConnections 1 setMaxConnections 20 setRetryAttempts 10 setSubscriptionEnabled true } } }
subscriptionEnabled
is set to true on the pool. For all the configuration options see the PoolFactory API in the Gemfire documentation