|
|
| Author |
Message |
|
| jacobvorreuter |
Posted: Fri Aug 01, 2008 6:50 am |
|
|
|
Joined: 01 Aug 2008
Posts: 1
Location: San Francisco
|
Is it possible to create nodes (ie: [node1@localhost, node2@localhost]) programmatically?
If you had a fragmented Mnesia database running across 10 nodes for example, are you forced to start 10 erl consoles from the shell?
Is there a way to manage (start and stop) nodes from an erlang process? Something like the following?
spawn_node(Name, Host) -> {ok, Node} | {error, Reason}
then you could do:
{ok, _Node} = spawn_node(node1, net_adm:localhost()),
pong = net_adm:ping(node1@localhost),
rpc:call(node1@localhost, mnesia, start, []).
Thanks,
Jake |
|
|
| Back to top |
|
| michal |
Posted: Fri Aug 01, 2008 7:07 am |
|
|
|
User
Joined: 20 Jul 2006
Posts: 44
Location: London
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|