Changes between Initial Version and Version 1 of MnesiaDB


Ignore:
Timestamp:
Feb 23, 2012, 3:44:22 PM (13 years ago)
Author:
manualwiki
Comment:

MnesiaDB page created

Legend:

Unmodified
Added
Removed
Modified
  • MnesiaDB

    v1 v1  
     1= Using the Mnesia database back-end = 
     2 
     3You do not need additional command line arguments, as this back-end currently the default. 
     4After the system is installed, you can start RefactorErl with 
     5{{{ 
     6#!sh 
     7 
     8bin/referl 
     9}}} 
     10 
     11Alternatively, you can specify the database manually by typing 
     12 
     13{{{ 
     14#!sh 
     15 
     16bin/referl -db mnesia 
     17}}} 
     18 
     19Mnesia uses the RefactorErl data directory to store its data. You can specify it by typing 
     20 
     21{{{ 
     22#!sh 
     23 
     24bin/referl -dir /path/to/your/data/dir 
     25}}} 
     26 
     27Note that if you would like to start several instances of !RefactorErl/Mnesia, 
     28you currently have to specify different paths for the instances, 
     29as Mnesia stores the name of the node in the database. 
     30Obviously, you have to choose different node names as well. 
     31 
     32{{{ 
     33#!sh 
     34 
     35bin/referl -sname name1 -dir /path/to/your/data/dir1 
     36bin/referl -sname name2 -dir /path/to/your/data/dir2 
     37 
     38# or 
     39 
     40bin/referl -name name1 -dir /path/to/your/data/dir1 
     41bin/referl -name name2 -dir /path/to/your/data/dir2 
     42}}} 
     43 
     44After the system is started, the following operations work on the full database. 
     45 
     46{{{ 
     47% Clear the whole database. 
     48ri:reset(). 
     49 
     50% Make a checkpoint. 
     51ri:backup(). 
     52 
     53% Undo all changes made since the last backup. 
     54ri:undo(). 
     55}}} 
     56 
     57You can also use all [[SemanticQuery|querying]] and [[RefactoringSteps|refactoring functionalities]]. 
     58 
     59= Comparison with the NIF back-end = 
     60 
     61Note that while the Mnesia back-end has been under development longer and can be expected to be more stable, 
     62it is much slower than the [[NifDB|NIF based back-end]]; 
     63you can expect about an order of magnitude of speed-up. 
     64Also, the NIF back-end may require less storage. 
     65As an indication, loading ejabberd-2.1.8 (6.6 MB on disk) takes '''18323 sec''' and '''566 MB''' of RAM and '''66 MB''' of disk space, while the NIF back-end on the same machine takes '''458 sec''' and '''556 MB''' of RAM and '''52 MB''' of disk space.