diff --git a/spec/configuration.md b/spec/configuration.md new file mode 100644 index 0000000..68d10c4 --- /dev/null +++ b/spec/configuration.md @@ -0,0 +1,40 @@ +# `dvs.toml` + +Every DVS repository has a `dvs.toml` file. Previous version +of [`dvs`](https://github.com/a2-ai/dvs) used YAML format, i.e. +`dvs.yaml`. There is a migration PR [#2](https://github.com/A2-ai/dvs2/pull/2). + +Default hashing is `blake3` always, yet we calculate other hashing in case of a non-local backend, in which calculating `blake3` is infeasible. + +default initialization should provide: + +```toml +compression = "zstd" +metadata_folder_name = ".dvs" # option + +[backend] +path = "/path/to/shared/storage +permissions = "664" +group = NULL # default to users default group +``` + +compression enum - `zstd | none` +hash_algorithms vector of hash algorithms - blake3, md5. + +## Storage format + +The local backend format follows the structure that files +are stored via their hashing, in which the first two characters determine the sub-directory, and the remainder of the hash denotes the name of the binary instantiation of the tracked datafile. + +Note that storage directory is not meant to be manipulated or explored. The binary blobs do not have file extensions, and the compression is discernable from the encoded compression byte in the file. + +## Audit log + +The audit log is responsible for tracking the version control events that has occurred. + +- `dvs add`-event (user, hash, file path, time of addition, message, ???) +- `dvs get`-event: Don't track these events. +- `dvs delete` / `dvs remove`: Track if files has been added then deleted (creator(user), remover(user), time of deletion, hash, ???) + +The audit log is on the backend, always, and not a property of the particular dvs repositories. Two dvs repositories that have the same backend will also have their own dedicated audit log events, and these will not be collated, combined, collapsed, consolidated, or otherwise. +