'Erlang multiple mnesia databases in the same application or in a application tree dependency
To use mnesia, the path on the filesystem to the relative mnesia scheme to be used must be set as the environment variable of the application(application:set_env('path_to_schema')). Now 2 questions arise:
- Is there a way to specify 2 different mnesia databases to use within the application?
- Let's assume we have 2 different applications that use mnesia. So we have application A using the mnesia scheme in path X and application B using the mnesia scheme in path Y. Now let's assume that application B is used as a dependency on application A and thus A will encompass application B. At that point what happens in terms of using the mnesia database? Will folder X or folder Y be used? Or will they be used independently within the relative application scope?
I thank anyone who answers in advance.
Solution 1:[1]
No, it's not possible to run two different copies of mnesia on the same erlang node at the same time.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Srijan Choudhary |