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