Changes between Initial Version and Version 1 of kcmini


Ignore:
Timestamp:
Oct 1, 2012, 2:36:15 PM (12 years ago)
Author:
manualwiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kcmini

    v1 v1  
     1= Kyoto Cabinet based graph = 
     2 
     3Kyoto Cabinet is a fast, lightweight storage DBRM. This graph is created on top of this data storage engine. This kind of graph consists of a minimal implementation in C, while the rest of the graph remained in Erlang. 
     4 
     5== Using the Kyoto Cabinet based graph == 
     6 
     7Linux: 
     8{{{ 
     9$: bin/referl -db kcmini 
     10}}} 
     11 
     12Windows: 
     13{{{ 
     14c:\> bin\referl -db kcmini 
     15}}} 
     16It is important to know that if the database is not closed properly, it will be corrupted. For this reason it is recommended to make backups of the database after loading the source code: 
     17{{{ 
     18erl> ri:backup("My first backup"). 
     19{ok,"backup.1"} 
     20}}} 
     21Other backup related functions: 
     22{{{ 
     23erl> ri:ls_backups(). 
     24["backup.1"] 
     25erl> ri:backup_info(1). 
     26Informations about 'backup.1': 
     27Commit-log: My first backup 
     28Time of creation: 2012-10-01 11:02:37 
     29 
     30ok 
     31erl> ri:restore(1). 
     32ok 
     33}}} 
     34Deleting all backups: 
     35{{{ 
     36erl> ri:clean(). 
     37ok 
     38erl> ri:ls_backups(). 
     39[] 
     40}}} 
     41 
     42== Default Parameters == 
     43 
     44With starting the database as written above, it will use some default parameters for setting up Kyoto Cabinet. 
     45 
     46== Tuning the database == 
     47 
     48It is also possible to customize the kyoto cabinet storage. For this, use the following command to start the tool: 
     49{{{ 
     50$: bin/referl -dbmod refdb_kyotomini -dbargs "[{dbtype, 'DbType'}, {param1, Val1}, ...]" 
     51}}} 
     52For the name and possible value of the parameters, please refer to the kyoto cabinet documentation at  [http://fallabs.com/kyotocabinet/api/kclangc_8h.html#a464237fa818e4b70b15526a898b5c5f5 Kyoto Cabinet / kclangc.h / kcdbopen()]. 
     53 
     54== Good to know == 
     55 
     56It is possible to create multiple graphs within the same tool instance 
     57{{{ 
     58erl> ri:ls_graphs(). 
     59[default] 
     60erl> ri:create_graph(my_graph). 
     61[default,my_graph] 
     62erl> ri:actual_graph(). 
     63default 
     64erl> ri:load_graph(my_graph). 
     65ok 
     66erl> ri:ri:actual_graph(). 
     67my_graph 
     68erl> ri:load_graph(default). 
     69ok 
     70erl> ri:delete_graph(my_graph). 
     71ok 
     72erl> ri:ls_graphs(). 
     73[default] 
     74}}}