Harmonia is a distributed storage engine based on Chord DHT algorithm.
It provides range query function over DHT storage layer.
It stores data with replication.
N.B.
Now, it is in alpha quality.
Paper: dissertation paper on Harmonia
Download, extract, and make
starts 5 virtual nodes on local machine:
./test/test5.sh -s
Then add a new virtual node to issue client commands:
erl -pa ebin -config harmonia -run hm_edge start -harmonia node_type ‘join’ name xxx sname ‘xxx_node@ubu’ root_node ‘node_foo@ubu’ -setcookie harmonia_cookie -sname ‘xxx_node@ubu’
stops 5 virtual nodes on local machine:
./test/test5.sh -q
create table as domain name is Domain1, table name is Tbl1, field names Fld1 and Fld2, etc, it returns node name on which table and its replicas were created.
7> hm_table:create_table(“Domain1”, “Tbl1”, [{"Fld1",true,true},{"Fld2",false, []}]).
Retrieve table property
8> hm_table:get_table_info(“Domain1”, “Tbl1”).
{ok,36885,[{"Fld1",true,0},{"Fld2",false,[]}]}
store data to Tbl1 in Domain1
9> hm_cli:rstore(“Domain1”, “Tbl1”, [{"Fld1", 1},{"Fld2", value1}]).
{ok,4}
10> hm_cli:rstore(“Domain1”, “Tbl1”, [{"Fld1", 100},{"Fld2", value2}]).
{ok,4}
11> hm_cli:rstore(“Domain1”, “Tbl1”, [{"Fld1", 1000},{"Fld2", value3}]).
{ok,4}
get data from Tbl1 in Domain1 with query condition Fld1 > 999
12> hm_cli:rget(“Domain1”, “Tbl1”, “Fld1 > 999”).
{ok,[[‘Domain1Tbl1’,1000,value3]]}
Harmonia is based on Chord algorithm, and it builds index on top of that, hence provides range query function.
Ref: http://pdos.csail.mit.edu/chord/
Copyright © Yoshihiro TANAKA
Written by Yoshihiro TANAKA <hirotnkg@gmail.com>
Apache 2.0 License
http://www.apache.org/licenses/