No description
Find a file
2025-06-13 20:40:28 -07:00
indexers feature: initial commit 2025-06-13 20:40:28 -07:00
organizers feature: initial commit 2025-06-13 20:40:28 -07:00
tests feature: initial commit 2025-06-13 20:40:28 -07:00
utils feature: initial commit 2025-06-13 20:40:28 -07:00
.gitignore feature: initial commit 2025-06-13 20:40:28 -07:00
cli.ts feature: initial commit 2025-06-13 20:40:28 -07:00
deno.json feature: initial commit 2025-06-13 20:40:28 -07:00
fsdb.ts feature: initial commit 2025-06-13 20:40:28 -07:00
README.md feature: initial commit 2025-06-13 20:40:28 -07:00

Disk Storage System

We use the disk instead of a database to reduce complexity. We leave the hard optimization to the filesystem layer.

API

`collection.create(T)` - creates an object of type T, saving it to the disk
`collection.get(id) : T` - gets an object of type T based on the id field configured
`collection.update(T)` - updates an object of type T, saving it to the disk
`collection.delete(T)` - removes an object from the system and the disk
`collection.find(criteria)` - find all objects that match the criteria *that have an index*

CLI

[you@machine:~/] fsdb users create '{
    "id": "able-fish-door-with-star-snow-idea-edge-salt-many",
    "email": "commandlinetestuser@domain.com",
    "phone": "213-555-1234",
    "value": "By the way a horse is a lemon from the right perspective."
}'
created: {
    "id": "able-fish-door-with-star-snow-idea-edge-salt-many",
    "email": "commandlinetestuser@domain.com",
    "phone": "213-555-1234",
    "value": "By the way a horse is a lemon from the right perspective."
}

[you@machine:~/] fsdb users update '{
    "id": "able-fish-door-with-star-snow-idea-edge-salt-many",
    "email": "commandlinetestuser@domain.com",
    "phone": "213-555-1234",
    "value": "By the way a horse is a lemon from the right angle."
}'
updated: {
    "id": "able-fish-door-with-star-snow-idea-edge-salt-many",
    "email": "commandlinetestuser@domain.com",
    "phone": "213-555-1234",
    "value": "By the way a horse is a lemon from the right angle."
}

[you@machine:~/] fsdb users get able-fish-door-with-star-snow-idea-edge-salt-many
{
    "id": "able-fish-door-with-star-snow-idea-edge-salt-many",
    "email": "commandlinetestuser@domain.com",
    "phone": "213-555-1234",
    "value": "By the way a horse is a lemon from the right angle."
}

[you@machine:~/] fsdb users delete '{
    "id": "able-fish-door-with-star-snow-idea-edge-salt-many",
    "email": "commandlinetestuser@domain.com",
    "phone": "213-555-1234",
    "value": "By the way a horse is a lemon from the right angle."
}'
deleted: {
    "id": "able-fish-door-with-star-snow-idea-edge-salt-many",
    "email": "commandlinetestuser@domain.com",
    "phone": "213-555-1234",
    "value": "By the way a horse is a lemon from the right angle."
}

Indexers

We create symlinks on the disk to help find objects more quickly and to allow for browsing the data as a human.

SQLite

TODO: index everything into a sqlite setup as well? would give a way to run SQL against data still stored on disk in a nicely human browsable format.