[Erlang] Different Nodes Flashcards

1
Q

Start a node with a short name

A

$ erl -sname gandalf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When should you use a short name, and when should you use a long name?

A

Start Erlang with the -name parameter. When we have two nodes on the
same machine, we use “short” names (as indicated by the -sname flag), but
if they are on different networks, we use -name.

We can also use -sname on two different machines when they are on the
same subnet. Using -sname is also the only method that will work if no
DNS service is available.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Start a node with a long name1

A

$ erl -name gandalf -setcookie abc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Name 3 things to consider when connecting nodes on two different physical machines

A
  • fully qualified hostnames of each node must be resolvable by DNS
  • cookie must be the same
  • same version of code and Erlang. Without this, weird and hard to debug errors can occur
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Make a call to a remote node with rpc

A

rpc:call(gandalf@soundwave, ksv, store, [weather, fine]).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly