<br><br><div><span class="gmail_quote">On 12/9/06, <b class="gmail_sendername">Ulf Wiger</b> <<a href="mailto:ulf@wiger.net">ulf@wiger.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Den 2006-12-09 15:13:23 skrev Joe Armstrong <<a href="mailto:erlang@gmail.com">erlang@gmail.com</a>>:<br><br>> Hello,<br>><br>> Question - *exactly* what is a "name" and "sname".<br>>
<br>> I do not want to know how to use them (I know) I want to know what they<br>> mean?<br>><br>> I'm writing chapters on "distributed erlang".<br>><br>> Can anybody complete the sentence(s).
<br>><br>> The command line argument "-sname X" means ...<br>><br>> The command line argument "-name Y" means....<br>><br>> The difference between sname and name is ...
<br>><br>> Thanks<br><br>Just to point out the obvious, this is what the 'erl' man page says about<br>-name and -sname:</blockquote><div><br>Well it's not obvious to me....<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-name Name<br>Makes the Erlang runtime system into a distributed node. This flag invokes<br>all network servers necessary for a node to become distributed. See<br>net_kernel(3). It is also ensured that epmd runs on the current host
<br>before Erlang is started. See epmd(1).<br>The name of the node will be Name@Host, where Host is the fully qualified<br>host name of the current host. For short names, use the -sname flag<br>instead.</blockquote><div><br>
This seems understandable<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">-sname Name<br>Makes the Erlang runtime system into a distributed node, similar to -name,
<br>but the host name portion of the node name Name@Host will be the short<br>name, not fully qualified.This is sometimes the only way to run distributed Erlang if the DNS<br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
(Domain Name System) is not running. There can be no communication between<br>nodes running with the -sname flag and those running with the -name flag,<br>as node names must be unique in distributed Erlang systems.</blockquote>
<div><br>What on earth does this mean - I've read this several times and I don't understand it.<br><br>"the host name portion of the node name Name@Host will be the short<br>name, not fully qualified."<br><br>What does this mean????
<br><br>What It might mean might be the following (at least this would be <br>logical, but it would mean that the syntactic form of Name in the two comands was different)<br> <br> erl -name <a href="mailto:abc@aaa.bbb.ccc.com">
abc@aaa.bbb.ccc.com</a><br> <br> makes a node with name <a href="mailto:abc@aaa.bbb.ccc.com">abc@aaa.bbb.ccc.com</a><br><br> erl -sname foo <br><br> when my host name is <a href="http://aaa.bbb.ccc.com">aaa.bbb.ccc.com
</a><br> would create a node called <a href="mailto:foo@aaa.bbb.ccc.com">foo@aaa.bbb.ccc.com</a><br><br>If this were the case then I see no reason why the node started<br>with name would not be able to talk to the node started with sname
<br>..<br><br> When I do erl -sname foo on my machine (with hostname msi)<br>erlang says my node is called:<br><br>(foo@localhost) ><br><br>(ie not foo@msi) ....<br><br> Goodness knows why<br><br>/Joe<br><br><br><br>
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">--<br>Ulf Wiger<br></blockquote></div><br>