<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I like Bela&#8217;s configuration.&nbsp; Maybe take it a step further and allow a default backup configuration for all sites?&nbsp; &nbsp;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>FWIW, here&#8217;s my config.&nbsp; I get warnings about looping back to the site, but it seems to work.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp; &lt;global&gt;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&lt;sites local=&quot;${net.beaumaris.site.local:site1}&quot;&gt;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;site name=&quot;${net.beaumaris.site.site01:site1}&quot;/&gt;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;site name=&quot;${net.beaumaris.site.site02:site2}&quot;/&gt;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;site name=&quot;${net.beaumaris.site.site03:site3}&quot;/&gt;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; &lt;/sites&gt;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8230;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='font-size:7.0pt;font-family:"Courier New"'>&lt;default&gt;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&lt;sites&gt;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;backups&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;backup site=&quot;${net.beaumaris.site.site01:site1}&quot; strategy=&quot;ASYNC&quot;/&gt;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;backup site=&quot;${net.beaumaris.site.site02:site2}&quot; strategy=&quot;ASYNC&quot;/&gt;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;backup site=&quot;${net.beaumaris.site.site03:site3}&quot; strategy=&quot;ASYNC&quot;/&gt;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/backups&gt;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:7.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; &lt;/sites&gt;</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Erik <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> infinispan-dev-bounces@lists.jboss.org [mailto:infinispan-dev-bounces@lists.jboss.org] <b>On Behalf Of </b>Mircea Markus<br><b>Sent:</b> Friday, September 21, 2012 8:36 AM<br><b>To:</b> infinispan -Dev List<br><b>Subject:</b> Re: [infinispan-dev] Cross-site clustering<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=MsoNormal>On 21 Sep 2012, at 15:13, Bela Ban wrote:<o:p></o:p></p></div><p class=MsoNormal><br><br><o:p></o:p></p><div><p class=MsoNormal>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=&quot;LON&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;site name=&quot;SFO&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;site name=&quot;NYC&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;site name=&quot;LON&quot;/&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=&quot;${SITE:LON}&quot;...&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&#8230;<o:p></o:p></p></div><p class=MsoNormal>yes, defining these sites is not required. The only thing that's needed is &nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;&lt;sites local=&quot;LON&quot;&gt;<br><br><o:p></o:p></p><div><p class=MsoNormal><br>#2 Backups config:<br>&nbsp;&lt;namedCache name=&quot;users&quot;&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=&quot;NYC&quot; backupFailurePolicy=&quot;WARN&quot; <br>strategy=&quot;SYNC&quot; timeout=&quot;12000&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;backup site=&quot;SFO&quot; backupFailurePolicy=&quot;IGNORE&quot; <br>strategy=&quot;ASYNC&quot;/&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=&quot;${site:LON}&quot; backupSites=&quot;${backup-sites:SFO,NYC}&quot; /&gt;<o:p></o:p></p></div><p class=MsoNormal>This would require configuring &quot;localSite&quot; for all caches in the system. Unless added to the default cache and forbid an override. I'd prefer to keep it in the global, but don't really have a strong feeling about it.<o:p></o:p></p></div><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>&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=&quot;NYC&quot; backupFailurePolicy=&quot;WARN&quot; <br>strategy=&quot;SYNC&quot; timeout=&quot;12000&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;backup site=&quot;SFO&quot; backupFailurePolicy=&quot;IGNORE&quot; <br>strategy=&quot;ASYNC&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;backup site=&quot;LON&quot; backupFailurePolicy=&quot;IGNORE&quot; <br>strategy=&quot;ASYNC&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/backups&gt;<br>&nbsp;&nbsp;&nbsp;&lt;/sites&gt;<br>&lt;/global&gt;<o:p></o:p></p></div></blockquote><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>For me the above seems harder to read than the one currently in use, but otoh simplifying the config would be something nice.<o:p></o:p></p></div><div><p class=MsoNormal>What do other think? Erik?&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><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=&quot;SFO,NYC&quot;<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.<o:p></o:p></p></div></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><span style='color:black'><br></span>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><a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><o:p></o:p></p></div></blockquote></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><div><div><div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'>Cheers,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'>--&nbsp;<br>Mircea Markus<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'>Infinispan lead&nbsp;(<a href="http://www.infinispan.org">www.infinispan.org</a>)<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p>&nbsp;</o:p></span></p></div></div></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>