[erlang-questions] Mnesia create tables best practices

Roberto Ostinelli roberto.ostinelli@REDACTED
Wed Feb 11 09:07:44 CET 2015


Adding to this: doesn't it mean that the name and full host of the node need to be known before you can initialize your db, hence a release can only be specific for a specific full node name?



> On 10/feb/2015, at 21:57, Martin Karlsson <martink@REDACTED> wrote:
> 
> 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.
> 
> Cheers,
> Martin
> 
> 
> 
>> 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/9595eb12/attachment.htm>


More information about the erlang-questions mailing list