emulate target node names on a workstation

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Wed Dec 1 09:57:31 CET 2004


I just thought I'd mention that I sent a set of patches to OTP 
(based on OTP R10B_0) that make it possible to run several 
Erlang nodes on the same machine using the convention 

  'erl -sname <name>@<host>'. 

This wasn't possible before, unless perhaps if the <name> part 
happened to be unique for all nodes involved. My patch makes 
epmd aware of the whole node name -- not just the first half.

I've attached an archive with a set of diffs (for epmd_srv.c, 
epmd.h, epmd_int.h, net_kernel.erl, erl_epmd.[eh]rl, 
inet_tcp_dist.erl). If anyone wants copies of the full source, 
please email me.

Note that I've only dealt with the Erlang parts -- not C nodes 
et al. Here's a chance to contribute. ;-)

AFAIK, the new epmd is backward compatible, but the <host> part 
known to epmd will default to the original host name (this is 
done since older erlang nodes don't pass the <host> part when 
they register with epmd.)

Using this feature also requires a custom inetrc file. This 
is all described in the ERTS User Guide.

(At AXD 301, we've used a mapping layer on top of the node names 
to allow for them changing depending on environment. While there 
may be some additional point to doing this, it has occured to me 
that the Erlang node name is a logical abstraction in itself, and 
should be sufficient in most cases. Using the node names directly 
would cut down on the amount of glue code needed in the system. 
Note, though, that we're not pushing this as a priority item. OTP 
may choose to include it, or not. We don't care that much. I still 
think it's a nice idea, though. Finally - fair warning: this was 
my first "significant" c hack in 12-13 years -- absolutely no 
warranty! :-)

/Uffe
 
 <<epmd_diffs.tgz>> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: epmd_diffs.tgz
Type: application/octet-stream
Size: 2888 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20041201/03be8fa5/attachment.obj>


More information about the erlang-questions mailing list