[erlang-questions] Mnesia Erlang OTP Application sharing Schema/tables
Fri Feb 1 05:06:27 CET 2008
Do I create another separate application that does mnesia schema/table
initilization and have that mnesia initializing application start first on
nd1 or nd2?
If so, then the following steps would be:
1) start the mnesia initilization application on nd1 or nd2.
2) Then, I use the builder to create separate .rel and other files, and load
app1 on ndA without regards to the condition of mnesia shema/tables?
3) Repeat the step 2, but with app1 with ndB.
Am I right so far with this kind of thinking? Or is it better to have
supervisor starting mnesia initialization first on either nd1 or nd2 and
then app1 on ndA and app1 on ndB. No simple answer, this is getting
Anyone have a sample make file that uses builder to create .app .rel .boot
There seem to be link to the make in the old email archive:
the link for the make file doesn't seem to work.
I ran the builder, very handy tool indeed. But, I didn't understand the
BUILDER_OPTIONS file. Is there sample BUILDER_OPTIONS template file?
On Jan 29, 2008 5:23 AM, Ulf Wiger (TN/EAB) <> wrote:
> My preference is to have an explicit 'install' phase,
> where the schema and tables are created.
> The 'builder'(*) tool offers a simple way to do this,
> in that it creates a start script with the start
> commands removed for all apps except kernel and
> stdlib (it then slaps a .load extension on it).
> This way, you can get all the paths and environment
> variables set correctly, and then create the schema
> and tables safely.
> The main point is that the applications should be able
> to expect that the tables have been created in advance,
> and not engage in complex decision-making logic to
> try to figure out why they're not there.
> Ulf W
> (*) This was a tool that I built long ago to test the
> idea of incrementally building boot scripts for each
> application, as the system grew. It's in jungerl.
> db skrev:
> > Hello,
> > 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 recreation?
> > 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
> > 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
> > thanks,
> > russ
> > ------------------------------------------------------------------------
> > _______________________________________________
> > erlang-questions mailing list
> > http://www.erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions