#version #git-version #version-control #git #rocksdb #key-prefix #data-management

vsdb_core

A stuctured DB with some 'Git-like' features, mainly used in blockchain projects

36 releases (16 breaking)

0.62.1 Feb 26, 2024
0.61.1 Oct 10, 2023
0.61.0 Jul 21, 2023
0.54.0 Mar 27, 2023
0.45.1 Jun 24, 2022

#5 in #key-prefix

Download history 7/week @ 2024-01-08 24/week @ 2024-01-22 7/week @ 2024-02-05 94/week @ 2024-02-12 61/week @ 2024-02-19 215/week @ 2024-02-26 112/week @ 2024-03-04 84/week @ 2024-03-11 33/week @ 2024-03-18 5/week @ 2024-03-25 77/week @ 2024-04-01 8/week @ 2024-04-08 16/week @ 2024-04-15

107 downloads per month
Used in 9 crates (via vsdb)

GPL-3.0 license

215KB
5K SLoC

Latest Version Rust Documentation Minimum rustc version

vsdb_core

The core implementations of vsdb.

Design Principles

Based on the underlying one-dimensional linear storage structure (native kv-database, such as rocksdb, etc.), multiple different namespaces are divided, and then abstract each dimension in the multi-dimensional logical structure based on these divided namespaces.

In the category of kv-database, namespaces can be expressed as different key ranges, or different key prefix.

This is the same as expressing complex data structures in computer memory(the memory itself is just a one-dimensional linear structure).

User data will be divided into two dimensions: 'branch' and 'version', the functions of the 'basic' category are stateless, and the functions of the 'versioned' category are stateful. In the internal implementation, each stateful function is implemented based on its corresponding stateless function, all stateful data has two additional identification dimensions ('branch' and 'version'), somewhat like the logic in Git. Stateless functions do not have the feature of 'version' management, but they have higher performance.

LICENSE

  • MIT for v0.40 and earlier
  • GPL-3.0 for v0.41 and later

Dependencies

~2–14MB
~151K SLoC