cliffmoon / dynomite

Open source dynamo clone written in Erlang.

This URL has Read+Write access

cliffmoon (author)
Mon Dec 01 00:03:40 -0800 2008
commit  e4338df42e33bd8dda2824099f9ab684bea6d079
tree    e7e716f110ea5a608f61d8c7ab25c42043529a08
parent  09869eb77c5fbb8f1548430817e232fc838dc440
dynomite / BTREEFORMAT
100644 23 lines (14 sloc) 0.527 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Implementation of a btree based merkle tree. The original merkle tree would not scale out to a large number of keys due to the limitation of keeping the tree in main memory. Therefore we will try and store the
 
btree file:
preamble: blocksize, rootpointer
node:{0,m:32,[keyhash:32],[childhash:32,child:64]}
 
leaf:{1,m:32,[keyhash:32,keypointer:64,valhash:32]}
 
for nodes:
blocksize = 1 + 4 + D*4 + (D+1)*12
D = (blocksize-17)/16
 
for leaves:
blocksize = 5 + D*16
D = (blocksize-5)/16
 
65521
 
 
 
key file:
 
[key\0,key\0,key\0]