Tokyo Cabinet Backend
Introduction
Tokyo Cabinet can be used to store more data in a Scalaris node than would fit into its main memory.
Note: you don’t get persistence!!! DB files are truncated on first access!!!
Prerequisites
You will need:
Switching to toke
- Install Tokyo Cabinet
- Install/make toke, e.g. by installing an rpm, provided by our repositories for some linux distributions
-
Rerun configure with
--enable-toke
. configure assumes that you installed toke in your erlang’s lib directory, i.e. “/lib/toke" or " /lib/toke- ". If you use a different directory, e.g. /home/scalaris/apps/toke, you have to provide the path to configure: ./configure --enable-toke=/home/scalaris/apps/toke/
-
Change the database used by db_dht to db_toke (in db_dht.erl):
-define(DB, db_toke).
%-define(DB, db_ets).
-
recompile
make
The database files are currently stored in the data sub-directory. Each node creates its own sub-directory and each scalaris node will have a different file. The path can be changed in scalaris.cfg with the db_directory option.