Mnesia with a dynamic nodes network

Ulf Wiger (AL/EAB) <>
Fri Feb 11 16:27:35 CET 2005


Look into the extra_db_nodes environment variable.
Using this, you can have a few permanent nodes and 
let other nodes come and go as 'diskless nodes' 
(they will create a ram copy of the schema from the 
master nodes.) You can use the function add_table_copy()
to add replicas even on the 'diskless' nodes.

The simple way to do it is that e.g. two nodes are 
permanent, and all other nodes are started with 
the following in their sys.config:

 {mnesia, [{extra_db_nodes, [NodeA, NodeB]}]}

Then, the dynamic nodes will contact the permanent
nodes and get the schema.

/Uffe

> -----Original Message-----
> From: 
> [mailto:]On Behalf Of olivier
> Sent: den 11 februari 2005 16:14
> To: 
> Subject: Mnesia with a dynamic nodes network
> 
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> 	Hello,
> 
> 	I'm reading the Mnesia documentation and as far as i understand
> one must create the database schema on all the nodes before using it.
> 
> My question is: how to deal with dynamic nodes ? I'd like to have for
> example a table replicated on 2 nodes, and at a later time add a third
> node, so that the table gets replicated on all three.
> 
> Is that possible ? How would you do that ?
> 
> Thanks,
> 
> - --
> Olivier
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFCDMu/pqVXaJzJYNIRAk7tAJ0eYbNZHJ31y8Q19jtjAybHtq3OOwCeKCc1
> 044sbBDXkKZNAEWcGCsYqN0=
> =+XF3
> -----END PGP SIGNATURE-----
> 



More information about the erlang-questions mailing list