Skip to content
/ kadb Public

Lightning fast Immutable Key-Array Database server.

Notifications You must be signed in to change notification settings

chientrm/kadb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e6f56f3 · Sep 13, 2022
Sep 10, 2022
Sep 10, 2022
Sep 10, 2022
Sep 10, 2022
Sep 10, 2022
Sep 10, 2022
Sep 10, 2022
Sep 10, 2022
Sep 10, 2022
Sep 13, 2022
Sep 10, 2022
Sep 10, 2022
Sep 10, 2022

Repository files navigation

kadb

Lightning fast Immutable Key-Array Database.

Common use cases

  • Logging server
  • Uneditable chat room/forum
  • Uneditable mailbox

Why kadb?

  • Write value: O(logn)
  • Read subarray: O(logn)

n is the total number of key

Implementation

  • Linux's io_uring
  • AVL Tree
  • Array accumulated items length
  • realloc strategy double
  • Single-threaded

Clone

git clone https://github.com/chientrm/kadb

Build

cd kadb
./configure
make kadb

Start server

kadb

Listening on http://localhost:8080

GET

Get 10 value of key key-1 (5 bytes length) from offset 0

curl http://localhost:8080/0005/0000/0010/key-1

Example result

HTTP Header
------------------------
Kadb-n_items: 2
Content-Type: text/plain
Content-Length: 13

HTTP Body
------------------------
value1;value2;

meaning key key-1 has total 2 items.

PUT

Put value 1234 to key abc.

curl http://localhost:8080/0003/0004/abc1234

Result status code 200

Benchmarks

...coming soon...

About

Lightning fast Immutable Key-Array Database server.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published