<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Looks good. &nbsp;I'm definitely in favour of a simpler config.<div><br><div><div>On 21 Sep 2012, at 13:13, Bela Ban &lt;<a href="mailto:bban@redhat.com">bban@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Mircea,<br><br>I'm in the process of setting up the Infinispan GUI demo across 3 data <br>centers, and I ran into an issue with the Infinispan config file. Not <br>really a bug, but something that could be improved.<br><br>Currently, the Infinispan config (let's call it infinispan.xml) defines <br>the sites and their backup sites and refers to the local JGroups cluster <br>config file (jgroups.xml). The latter has a RELAY2 protocol at the top <br>of its stack which points to the relay configuration (relay2.xml), which <br>defines the sites and how they connect to each other. Finally, there's a <br>jgroups-relay2.xml file (referred to from relay2.xml) which defines the <br>global bridge, connecting all 3 sites.<br><br>OK, so that 4 config files and I don't see how to reduce them. <br>However... currently infinispan.xml is *site-specific*, ie. we need 1 <br>infinispan.xml for LON, 1 for SFO and 1 for NYC.<br><br>The 3 JGroups config files (jgroups.xml, relay2.xml and <br>relay2-bridge.xml) are *not* site-specific, ie. they can be used in any <br>site, provided that we set a few system properties, such as <br>cluster-specific mcast address and port, and site name (relay2.xml).<br><br>I believe cross-site clustering would benefit from making infinispan.xml <br>symmetric as well, that is, we could use it in any site.<br><br>To do this, I suggest the following:<br><br>#1 Sites config:<br> &nbsp;&lt;sites local="LON"&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;site name="SFO"/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;site name="NYC"/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;site name="LON"/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/sites&gt;<br><br><br>Nothing needs to be changed here, except to parameterize local: &lt;sites <br>local="${SITE:LON}"...&gt;. A node in a given site can then be started <br>using -DSITE=LON. This could also be used for relay2.xml.<br><br>- Question-1: why do we need to list the sites above ? We're not <br>defining any config for those sites, so I don't see why this is needed...<br><br>#2 Backups config:<br> &nbsp;&lt;namedCache name="users"&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;sites&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;backups&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;backup site="NYC" backupFailurePolicy="WARN" <br>strategy="SYNC" timeout="12000"/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;backup site="SFO" backupFailurePolicy="IGNORE" <br>strategy="ASYNC"/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/backups&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/sites&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;/namedCache&gt;<br><br><br>This is *asymmetric*. IMO, a better config would be:<br><br>&lt;global&gt;<br> &nbsp;&nbsp;&lt;sites&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;localSite="${site:LON}" backupSites="${backup-sites:SFO,NYC}" /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;backups&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;backup site="NYC" backupFailurePolicy="WARN" <br>strategy="SYNC" timeout="12000"/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;backup site="SFO" backupFailurePolicy="IGNORE" <br>strategy="ASYNC"/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;backup site="LON" backupFailurePolicy="IGNORE" <br>strategy="ASYNC"/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/backups&gt;<br> &nbsp;&nbsp;&nbsp;&lt;/sites&gt;<br>&lt;/global&gt;<br><br><br>Here, we define global backup strategies and the local site. Both of <br>them can be parameterized, e.g. we start up nodes in<br>- LON: -Dsite=LON -DbackupSites="SFO,NYC"<br>- SFO: -Dsite=SFO -DbackupSites=NYC<br>- NYC: -Dsite=NYC -DbackupSites= &nbsp;&nbsp;&nbsp;&nbsp;// no backups<br><br><br>This would allow us to have only 1 infinispan.xml, regardless of the <br>site in which it is used.<br><br>Of course, since backup strageties are globally defined, if people <br>wanted different backup strategies per site (or per named cache), they <br>could still copy infinispan.xml and modify it...<br><br>WDYT ?<br><br><br><br><br>-- <br>Bela Ban, JGroups lead (<a href="http://www.jgroups.org">http://www.jgroups.org</a>)<br>_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/infinispan-dev<br></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div><a href="http://twitter.com/maniksurtani">twitter.com/maniksurtani</a></div><div><br></div><div><div>Platform Architect, JBoss Data Grid</div><div><a href="http://red.ht/data-grid">http://red.ht/data-grid</a></div></div></div></span></div></span></div></span>
</div>
<br></div></body></html>