<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 5, 2013 at 6:04 PM, Bela Ban <span dir="ltr">&lt;<a href="mailto:bban@redhat.com" target="_blank">bban@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


<div><br>
<br>
On 3/5/13 3:30 PM, Erik Salter wrote:<br>
&gt; Hi guys,<br>
&gt;<br>
&gt; Keep in mind that some of your customers may have built queries and indexes<br>
&gt; on cluster names on top of very expensive analytics engines.<br>
<br>
<br>
</div>Well, if they use their own naming (JChannel.setName()), no problem.<br>
<br></blockquote><div><br></div><div>Bela, you mean GlobalConfiguration.transport().nodeName(), right? :)<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



But I&#39;ve said (many times) that relying on node names is a *bad thing* !<br>
Node names are syntactic sugar, and there may not be a name associated<br>
with a node, and then it has to be fetched dynamically, using an ARP<br>
like protocol.<br>
<br></blockquote><div><br></div><div>So if a thread logging the name of a node it may trigger an &quot;RPC&quot; and it&#39;ll block until it gets a response?</div><div>That doesn&#39;t sound right...<br></div><div> </div>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
If someone wanted to add information to an address, then the way to do<br>
it would be to use an AddressGenerator and return subclasses of UUID,<br>
e.g. PayloadUUID.<br>
<div><div><br></div></div></blockquote><div><br></div><div>I think Erik just wants the logs to contain the actual host names, so that they match with the logs from other sources. Using a PayloadUUID and sending the host name with every message would be overkill for that.</div>


<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>
<br>
&gt; If this discussion is limited in scope to internal applications, that&#39;s<br>
&gt; fine.  If not, having done debugging of issues on live customer sites, I<br>
&gt; think it&#39;s fine the way it is.<br>
&gt;<br></div></div></blockquote><div><br></div><div>Erik, the discussion is by no means limited to internal applications. However...<br><br></div><div>1. Replacing the random number with a counter would require the user to configure a persistent location for the counter, so even if we implement it we have to make it opt-in.<br>

<br></div><div>2. The discussion about the host name part only applies if the user doesn&#39;t specify a node name in the Infinispan configuration.<br></div><br><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


<div><div>
&gt; Erik<br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:infinispan-dev-bounces@lists.jboss.org" target="_blank">infinispan-dev-bounces@lists.jboss.org</a><br>
&gt; [mailto:<a href="mailto:infinispan-dev-bounces@lists.jboss.org" target="_blank">infinispan-dev-bounces@lists.jboss.org</a>] On Behalf Of Bela Ban<br>
&gt; Sent: Tuesday, March 05, 2013 1:50 AM<br>
&gt; To: <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
&gt; Subject: Re: [infinispan-dev] [infinispan-internal] Unstable Cluster<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On 3/4/13 6:35 PM, Dan Berindei wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Mar 4, 2013 at 10:28 AM, Bela Ban &lt;<a href="mailto:bban@redhat.com" target="_blank">bban@redhat.com</a><br>
&gt;&gt; &lt;mailto:<a href="mailto:bban@redhat.com" target="_blank">bban@redhat.com</a>&gt;&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;      Another node: in general, would it make sense to use shorter names ?<br>
&gt;&gt;      E.g. instead of<br>
&gt;&gt;<br>
&gt;&gt;      ** New view: [jdg-perf-01-60164|9] [jdg-perf-01-60164,<br>
&gt;&gt;      | jdg-perf-01-24167, jdg-perf-01-53841, jdg-perf-01-39558,<br>
&gt;&gt;      | jdg-perf-01-8977, jdg-perf-01-49115, jdg-perf-01-24774,<br>
&gt;&gt;      | jdg-perf-01-5758, jdg-perf-01-37137, jdg-perf-01-45330,<br>
&gt;&gt;      | jdg-perf-01-24793, jdg-perf-01-35602, jdg-perf-02-7751,<br>
&gt;&gt;      | jdg-perf-02-37056, jdg-perf-02-50381, jdg-perf-02-53449,<br>
&gt;&gt;      | jdg-perf-02-64954, jdg-perf-02-34066, jdg-perf-02-61515,<br>
&gt;&gt;      | jdg-perf-02-65045 ...]<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;      we could have<br>
&gt;&gt;      ** New view: [1|9] [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,<br>
&gt;&gt;      16, 17, 18, 19, 20, ...]<br>
&gt;&gt;<br>
&gt;&gt;      This makes reading logs *much* easier than having those long names.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Yes and no... I sometimes find it useful to have a somehow longer<br>
&gt;&gt; name, as searching/filtering for a node in the log is pretty much<br>
&gt;&gt; impossible with a name like &quot;1&quot;.<br>
&gt;<br>
&gt;<br>
&gt; Yes, however if you have context it&#39;s not an issue, e.g. in JGroups I<br>
&gt; oftentimes prefix my messages with name:. So, for example, if you&#39;re looking<br>
&gt; for unicast traffic received by 5, this would work &quot;5: &lt;--&quot; as grep<br>
&gt; argument.<br>
&gt;<br>
&gt; I agree this isn&#39;t useful when you want to follow the address of a member<br>
&gt; throughout the log, and all protocols.<br>
&gt;<br>
&gt;&gt; I also think we need the random number at the end so that we can debug<br>
&gt;&gt; problems with node restarts. In JDG/AS7 they don&#39;t add a random<br>
&gt;&gt; number, and it was very difficult to see what was happening when a<br>
&gt;&gt; node name appeared twice in the consistent hash. But we could make the<br>
&gt;&gt; random number shorter.<br>
&gt;<br>
&gt;<br>
&gt; Would maintaining a base name (A) and then incrementing a short help ?<br>
&gt; E.g. A1, when restarted A2 ? The problem is that we&#39;d have to store the<br>
&gt; number on disk...<br>
&gt;<br>
&gt;<br>
&gt;&gt;      If we wanted the host name to be part of a cluster name, we could use<br>
&gt;&gt;      the alphabet, e.g. A=jdk-perf-01, B=jdg-perf-02:<br>
&gt;&gt;<br>
&gt;&gt;      ** New view: [A1|9][A1, A2, A3, B4, B6, C2, C3, ...]<br>
&gt;&gt;<br>
&gt;&gt;      This is of course tied to a given host naming scheme. But oftentimes,<br>
&gt;&gt;      host names include numbers, so perhaps we could use a regexp to<br>
&gt; extract<br>
&gt;&gt;      that number and use it as a prefix to the name, e.g.<br>
&gt;&gt;      cluster-01 first instance: 1-1<br>
&gt;&gt;      cluster-02 2nd instance: 1-2<br>
&gt;&gt;      etc.<br>
&gt;&gt;<br>
&gt;&gt;      Thoughts ?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Are you thinking of an automatic way of assigning a letter+digit<br>
&gt;&gt; combination to a node on startup? We also use the node name for some<br>
&gt;&gt; other stuff (e.g. thread names), so I&#39;m not sure if it&#39;s feasible to<br>
&gt;&gt; wait until we have connected to the JGroups cluster to set the node name<br>
&gt;&gt; dynamically.<br>
&gt;&gt;<br>
&gt;&gt; For RadarGun we could use a static system where we configure a node name<br>
&gt;&gt; for each slave and then RadarGun passes the node name to Infinispan via<br>
&gt;&gt; a system property. No Infinispan changes required (except perhaps making<br>
&gt;&gt; the random number in the node name optional.)<br>
&gt;<br>
&gt;<br>
&gt; I think this would already help; for apps / tests that we control, we<br>
&gt; should strive to make names as short as possible. I often find myself<br>
&gt; awking and seding a log file before I even look at it, as names are way<br>
&gt; too long.<br>
&gt;<br>
&gt; Would it help if a base name could be set in a channel, e.g.<br>
&gt; channel.setBaseName(&quot;A&quot;) and then we maintain a file A in temp storage<br>
&gt; to which we write 1 (first time, file doesn&#39;t exist) ? Next time we&#39;d<br>
&gt; read the file (which matches the base name) and write the incremented<br>
&gt; number (2) ? So we&#39;d have member A1, then A2 and so on...<br>
&gt;<br>
&gt; Thoughts ?<br>
&gt;<br>
<br>
--<br>
Bela Ban, JGroups lead (<a href="http://www.jgroups.org" target="_blank">http://www.jgroups.org</a>)<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div></div>