I asked a similar question yesterday about using one application inside another.
Let's say I want to use an application called x
inside a new module y
.
x
is already compiled and for the sake of simplicity, lets assume it is already running on localhost, and that the objective is to run both components in different nodes.
How can I call functions of x
from within y
?
Would something like rpc:call(Node, x, Fun, Param)
work?
Furthermore, is any (network) setup necessary in order to use the rpc
module?
Important
If you are not able to test connections between two nodes, make sure that you use the command line flag -name
and that you include the whole name in your net_adm:ping/1
call. e.g. if you named your node x@localhost
, you must ping x
from another module by executing net_adm('x@localhost').
. Notice the single-quotes. See this question for more details.