| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 03/17/2010 14:21:29
|
vinicius
neo
Joined: 03/17/2010 14:16:26
Messages: 1
Offline
|
Hello there! I'm starting with terrocotta and ehcache, and after just one day using it, one word: AMAZING. I had previous experience with JBossCache clustered, and I'm amazed on how easy its to setup a terracotta array and the ehcache :)
Just two questions though:
On our dev environment we would like to use the ehcache.xml without the need of terracotta server. Instead of having two files (one for the server and other for local mode) is it possible to configure ehcache to failback to a default config on local mode?
Suppose my Cache Server Cluster fail (We intend to have 2 machines with terracotta), Is it possible to keep using the ehcache without the servers? I'm aware of the problems with consistency that might arise, but its more important to us to stay online, in case those servers fail (we have around 10 servers that will stay "in front" of it). Back with JBossCache, since each node was a copy of the replicated cluster, that was not an issue. Is this possible?
Regards
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 03/17/2010 14:30:05
|
zeeiyer
consul
Joined: 05/24/2006 14:28:28
Messages: 493
Offline
|
I suppose you could have an ehcache.xml soft-link which then points to ehcache-clustered.xml or ehcache-standalone.xml and you can modify your build system to point to the right one based on the Environment you are in.
Cache Server Cluster fail - typically, since you have 2 TC servers, you need a double failure to lose both. That should be a rarity - but if it does happen you can use Cluster Events to catch the event and take corrective action. See http://www.terracotta.org/confluence/display/docs/Cluster+Events#ClusterEvents-HandlingnodeLeftNotReceived
This behavior of reacting to complete Terracotta Sever Cluster outage is also being revisited up as a product feature in an upcoming release, to make it even easier.
|
Sreeni Iyer, Terracotta.
Not a member yet - Click here to join the Terracotta Community |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 03/17/2010 15:46:59
|
gluck
qaestor
Joined: 09/15/2009 18:01:23
Messages: 179
Location: Brisbane, Australia
Offline
|
In terms of config probably the simplest is to use token replacement in ehcache.xml. As it says up the top:
System property tokens can be specified in this file which are replaced when the configuration
is loaded. For example multicastGroupPort=${multicastGroupPort} can be replaced with the System property command line switch such as -DmulticastGroupPort=4446.
So you do for example <terracotta clustered=${net.sf.ehcache.terracotta} />.
On the failover Iyer is quite right. We give you an event mechanism. We plan in the Esperance release to create some ready to go disconnected mode actions built-in. Some options you have to implement in your cluster listener right now: cache.setDisabled(true) acts as a cache bypass for puts and gets. Otherwise the Terracotta calls will block. You can set timeouts in the Terracotta config but it could be pretty horribly slow. Obviously you can do anything you want when you get the event the practicality of which is limited only by how much control you have over entry to the cache.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 07/18/2011 23:08:40
|
rajoshi
seraphim
Joined: 07/04/2011 04:36:10
Messages: 1474
Offline
|
Issue seems to be resolved.Please let us know if more information is required.
|
Rakesh Joshi
Terracotta. |
|
|
 |
|
|