An experiment to swap DETS for LETS as a backend for mnesia.
Erlang
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
Makefile
README.md
rebar.config

README.md

An experiment to swap DETS for LETS as a backend for mnesia.

Authors: Florian Odronitz (fo@twoflaots.com).

This is an experimental setup to use LETS (https://github.com/norton/lets/) as a backend for Mnesia. To make life easier, meck (https://github.com/eproxus/meck) is used to mock calls to DETS with calls to LETS. This means that after patching, nodes set to 'disc_only_copies' will use leveldb (http://code.google.com/p/leveldb/).

Setup

This is intended for Mnesia 4.6 which comes with Erlang/OTP R15B.

To compile the test for Mnesia go to your mnesia test directory (most likely /usr/local/otp_src_R15B/lib/mnesia/test) and type:

$ erl -make

If that fails, please consult the README file in the same directory.

To prepare mnesia_dets_to_lets do the following:

$ mkdir working-directory-name
$ cd working-directory-name
$ git clone git://github.com/odo/mnesia_dets_to_lets.git mnesia_dets_to_lets
$ cd mnesia_dets_to_lets

Make sure the path to mnesia in Makefile is correct. Then continue:

$ rebar get-deps
$ make
$ git clone git://github.com/odo/mnesia_dets_to_lets.git mnesia_dets_to_lets
$ cd mnesia_dets_to_lets

Usage

To start with all relevant paths set, type:

$ make start

Up till now, everything is standard and you can run Mnesia test suites:

$ dets_to_lets:test(durability).

To run all tests (takes a long time), type:

$ dets_to_lets:test(all).

To swap the DETS for LETS use:

$ dets_to_lets:init().

Now you can continue testing...