<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’s configuration. Maybe take it a step further and allow a default backup configuration for all sites? <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>FWIW, here’s my config. 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> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <global><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <sites local="${net.beaumaris.site.local:site1}"><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <site name="${net.beaumaris.site.site01:site1}"/><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <site name="${net.beaumaris.site.site02:site2}"/><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <site name="${net.beaumaris.site.site03:site3}"/><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> </sites><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> …<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'> </span><span style='font-size:7.0pt;font-family:"Courier New"'><default><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <sites><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <backups> <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <backup site="${net.beaumaris.site.site01:site1}" strategy="ASYNC"/><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <backup site="${net.beaumaris.site.site02:site2}" strategy="ASYNC"/><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> <backup site="${net.beaumaris.site.site03:site3}" strategy="ASYNC"/><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:7.0pt;font-family:"Courier New"'> </backups><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:7.0pt;font-family:"Courier New"'> </sites></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </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> </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> </o:p></p><p class=MsoNormal><o:p> </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> <sites local="LON"><br> <site name="SFO"/><br> <site name="NYC"/><br> <site name="LON"/><br> </sites><br><br><br>Nothing needs to be changed here, except to parameterize local: <sites <br>local="${SITE:LON}"...>. 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…<o:p></o:p></p></div><p class=MsoNormal>yes, defining these sites is not required. The only thing that's needed is <o:p></o:p></p></div><div><p class=MsoNormal> <sites local="LON"><br><br><o:p></o:p></p><div><p class=MsoNormal><br>#2 Backups config:<br> <namedCache name="users"><br> <sites><br> <backups><br> <backup site="NYC" backupFailurePolicy="WARN" <br>strategy="SYNC" timeout="12000"/><br> <backup site="SFO" backupFailurePolicy="IGNORE" <br>strategy="ASYNC"/><br> </backups><br> </sites><br> </namedCache><br><br><br>This is *asymmetric*. IMO, a better config would be:<br><br><global><br> <sites><br> <localSite="${site:LON}" backupSites="${backup-sites:SFO,NYC}" /><o:p></o:p></p></div><p class=MsoNormal>This would require configuring "localSite" 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> <backups><br> <backup site="NYC" backupFailurePolicy="WARN" <br>strategy="SYNC" timeout="12000"/><br> <backup site="SFO" backupFailurePolicy="IGNORE" <br>strategy="ASYNC"/><br> <backup site="LON" backupFailurePolicy="IGNORE" <br>strategy="ASYNC"/><br> </backups><br> </sites><br></global><o:p></o:p></p></div></blockquote><div><p class=MsoNormal><o:p> </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? <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </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="SFO,NYC"<br>- SFO: -Dsite=SFO -DbackupSites=NYC<br>- NYC: -Dsite=NYC -DbackupSites= // 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> </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'>-- <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 (<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> </o:p></span></p></div></div></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>