[erlang-questions] Mnesia Erlang OTP Application sharing Schema/tables

db masterofquestions@REDACTED
Tue Jan 29 05:37:45 CET 2008


My scenario is as follows:

mnesia is distributed and table fragmented(on nd1, nd2).  Now, when
application started on ndA 1st and on ndB 2nd.  App on ndA,ndB will access
same mnesia schema/tables. I create the schema and table when application is
started ndA.  Now, I start same application on ndB and have it not create
the schema/tables.

App on ndA, ndB are not distributed but two of the same app running on both
nodes (ndA, ndB).

e.g similar to two web app instances, on two different machine, connecting
to mysql cluster.

if app on ndA or ndB crash and then restared, how do I make the Application
so that it does not try to recreate the schema/tables. Is there a way to
check if schema/tables are there, so you don't do any schema/table

In erlang otp design, you start the 1st app on ndA which creates the schema
and table, now you take this same code and run it on ndB.  Now app on ndB
will try to create the schema/table.  How to stop this nonsense?

I don't want to cluster app on ndA and ndB together.  app on each node reads
a slightly different config file, but access the same schema/tables.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080128/f01688c1/attachment.htm>

More information about the erlang-questions mailing list