diff options
Diffstat (limited to 'doc/db.md')
-rw-r--r-- | doc/db.md | 38 |
1 files changed, 37 insertions, 1 deletions
@@ -17,7 +17,39 @@ Data entries are stored together with three attributes: - leaf hash hash over specific parts of the entry, usually together with a - timestamp, for use in a merkle tree + timestamp for use in a merkle tree + +## Storage in a file system + +Two files (catlfish names in parentheses): + +- treesize (treesize) + + filename is static, contains one line -- the number of entries in + the database + +- index (index) + + filename is static, contains one line per entry -- the leafhash + +Three directories, "bucketed" in three levels, one file per database +entry: + +- entry (certentries) + + filename=leafhash, content=the actual data of the entry + +- entryhash (entryhash) + + filename=entryhash, content=leafhash + +- indexforhash (certindex) + + filename=leafhash, content=index + +## Distributed + +TODO: describe distribution ## Erlang code in src/ @@ -31,6 +63,10 @@ Data entries are stored together with three attributes: file-based storage for ordered append-only lists of fixed-sized entries, retrievable by index +- perm.erl + + reading and writing of files + - atomic.erl atomic file operations |