[erlang-questions] Mnesia create tables best practices

Martin Karlsson martink@REDACTED
Tue Feb 10 21:57:34 CET 2015

Hi Jesper,

This is an interesting approach. I've gone the " leads to misery" path :)
I.e when a node starts up if it doesn't have a schema it waits for an
initialisation command from the use and it can either initialise itself as
the first node in the cluster or join another node. I've never been fully
happy with this.

How would your approach work with multiple nodes? I can understand starting
the first node using a pre-initialised schema but then the other node
starts up you want it to be able to join the mnesia cluster in a nice way
and not start and initialise its own schema.

An alternative I've also seen is having an mnesia "install" phase and use
the erlang boot scripts to kick the install process off.


On 11 February 2015 at 02:20, Jesper Louis Andersen <
jesper.louis.andersen@REDACTED> wrote:

> On Sun, Feb 8, 2015 at 7:25 PM, Roberto Ostinelli <
> roberto.ostinelli@REDACTED> wrote:
>> Can you please expand on this? Do you mean that when you boot a system
>> you reset the db?
> The DB is never reset. It is just that on the first deploy, there is a
> valid DB the system can use to start up and get to work. Apart from having
> the right schema, it can also be pre-populated with important data the
> systems needs in order to function correctly.
> --
> J.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150211/997b8d22/attachment.htm>

More information about the erlang-questions mailing list