Crates.io | edma |
lib.rs | edma |
version | 0.1.0-beta.5 |
source | src |
created_at | 2022-12-10 07:28:34.074061 |
updated_at | 2023-01-25 22:06:18.317646 |
description | EDMA: Embedded Database Management for All |
homepage | https://github.com/nomadiz/edma |
repository | https://github.com/nomadiz/edma |
max_upload_size | |
id | 733753 |
size | 123,926 |
Built by @nomadiz ███████╗██████╗ ███╗ ███╗ █████╗ ██╔════╝██╔══██╗████╗ ████║██╔══██╗ █████╗ ██║ ██║██╔████╔██║███████║ ██╔══╝ ██║ ██║██║╚██╔╝██║██╔══██║ ███████╗██████╔╝██║ ╚═╝ ██║██║ ██║ ╚══════╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ----------------------------------- Embedded Database Management for All
EDMA: Embedded Database Management for All is an open source project made to manage embedded key-value storages. EDMA is a TUI (Terminal User Interface) that is easy to install and configure. It allows engineer to traverse the embedded database and deserialize byte data with provided byte layout. This enhances the experience of working with low level database system like RocksDB or Redb.
RocksDB
, Redb
, `SledWindows
, Linux
and MacOS
EDMA supports multiple databases with easy plug-to-play architecture. Please check below list for supported databases and its features:
Database name | Description | EDMA release | Pull request |
---|---|---|---|
RocksDB | Support both non-column and column byte data viewer (COLUMN ) |
v0.1.0-beta.4 | N/A |
ReDB | Support default database (Will add TABLE view) |
v0.1.0-beta.4 | N/A |
Sled | Support both non-tree and tree byte data viewer (TREE ) |
v0.1.0-beta.5 | #8 Sled support |
To create a PR for a database integration, please go to Issues > New Issue > Feature request
If you already have a Rust environment set up, you can use the cargo install
command:
cargo install --version 0.1.0-beta.3 edma
PATH
environment variableConfiguration file is where you identify path to databases and EDMA byte templates. To set a config path, using a CLI command
$ edma --config-path [PATH_TO_FILE]
Please view EDMA Configuration file to learn more how configuration file works.
Run EDMA terminal application
$ edma
Set a config file path
$ edma --config-path [PATH]
Using help
command
$ edma --help
edma 0.1.0
A cross-platform TUI database management tool written in Rust
USAGE:
gui [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-c, --config-path <config-path> Set the config file
EDMA is a very first database management tool designed for embedded databases. Applying adapter design pattern into database storage implementation, it makes integration with databases become easier. EDMA supports two databases by default: RocksDB
and ReDB
. To integrate with other embedded databases, you can add the implementation in EDMA storage layer
EDMA is built using Rust library tui-rs
which makes it to be an app that can be run directly on your terminal. No startup time needed and it's extremely light weight. Run every where, every time, all at once
Data in embedded database is different from data presented in relational databases. While relational databases label data with specific type and attributes when it is created, embedded database can't do that. The only data type that embedded database displays is byte array. For example, [0 0 0 1 50 32 20]
. It is not human readable.
Using EDMA, byte data can be converted into human readable data using EDMA byte template system.
Instruction on how EDMA byte deserializer works: What is EDMA templates?
Command editor is one core feature of EDMA, it allows you to manage byte data using advanced commands. The image below shows how a database column family can iterated using command editor
Key | Description |
---|---|
ENTER | Enter focused section |
ESC | Escape from focused section |
9, 0 | Scroll up/down databases |
h, j | Scroll up/down key byte layout |
k, l | Scroll up/down value byte layout |
←, →, ↑, ↓ | Move focus to left/right/up/down |
h, d, l | Switch to home/databases/layouts |
q | Quit |
EDMA supports inline command to interact with embedded databases. The list of supported commands are
COLUMN
or TABLE
Iterate with defined column famility or table
String
: Column family namePREFIX
or SUFFIX
Iterate filtered by prefix or suffix.
Note: This command is for key iteration not value iteration.
String
: Prefix value or suffix valueDatabase name should be these two below
rocksdb
: RocksDBredb
: RedbDatabase path should be String
type
Byte template is an instruction combined by one or multiple byte layouts. It provides EDMA deserializer information about bytes data. To explain the use of byte template and byte layout, we have this example:
Original= edma2022github
Bytes= [65 64 6d 61 32 30 32 32 67 69 74 68 75 62]
Slicing data and labelling data as EDMA byte template, we have
[1]
original=edma
from=0
to=4
variant=String
[2]
original=2022
from=4
to=8
variant=Int32
[3]
original=github
from=8
to=13
variant=String
Configuration file example
{
"databases": [
{
"name": "rocksdb",
"path": "/temp"
},
{
"name": "sled",
"path": "/temp/sled"
}
],
"templates": [
{
"name": "Custom layout",
"layouts": [
{
"name": "name",
"from": 0,
"to": 5,
"variant": "String"
},
{
"name": "id",
"from": 5,
"to": 10,
"variant": "Int64"
}
]
}
]
}
Without these awesome open source projects, EDMA can't be complete. Please share the spotlight with these repo below:gobang
, tui-rs
, spotify-tui
and tui-re-tree-widget