Sign inSign up

taymour/elysiandb

By taymour

•Updated 6 months ago

Tiny key-value store with a simple REST API & TCP built in Go

Image
0

6.5K

taymour/elysiandb repository overview

⁠ElysianDB

Lightweight key–value store written in Go. Runs over HTTP and/or TCP, persists to disk with periodic flushes, and supports optional TTL.


⁠Features

  • HTTP REST (PUT/GET/DELETE /kv/{key}, POST /save, POST /reset, GET /health)
  • TCP text protocol (GET/SET/DEL/SAVE/RESET/PING, optional TTL=<seconds>)
  • In‑memory sharded store (xxhash routing), periodic on‑disk snapshots
  • Small Docker image, sensible defaults

⁠Image & Tags

 docker pull taymour/elysiandb:latest
 docker pull taymour/elysiandb:0.1.2

⁠Quick Start

# HTTP only (ephemeral)
docker run --rm -p 8089:8089 -p 8088:8088 taymour/elysiandb:latest

# HTTP + TCP, with persistent data
docker run -d --name elysiandb \
  -p 8089:8089 -p 8088:8088 \
  -v elysian-data:/data \
  taymour/elysiandb:latest

Health:

  • HTTP: GET /health → 200 OK
  • TCP: PING → PONG

⁠Configuration

Default config is embedded at /app/elysian.yaml:

store:
  folder: /data
  shards: 512
  flushIntervalSeconds: 5
server:
  http: { enabled: true,  host: 0.0.0.0, port: 8089 }
  tcp:  { enabled: true,  host: 0.0.0.0, port: 8088 }
log:
  flushIntervalSeconds: 5

Override by mounting your own file:

docker run -d --name elysiandb \
  -p 8089:8089 -p 8088:8088 \
  -v elysian-data:/data \
  -v $(pwd)/elysian.yaml:/app/elysian.yaml:ro \
  taymour/elysiandb:latest

Notes

  • store.folder must be writable (volume recommended).
  • store.shards ≥ 1; a power of two is recommended(e.g. 128/257/512).
  • To disable a protocol, set enabled: false for that listener.

⁠Exposed Ports & Volume

  • Ports: 8089 (HTTP), 8088 (TCP)
  • Volume: /data (store folder)

⁠Minimal Usage Examples

HTTP:

curl -X PUT "http://localhost:8089/kv/foo?ttl=10" -d 'bar'
curl http://localhost:8089/kv/foo
curl -X DELETE http://localhost:8089/kv/foo

TCP (netcat/telnet):

SET foo bar
GET foo
DEL foo
SET TTL=10 other value
PING

⁠Source & License

  • Source: github.com/taymour/elysiandb
  • License: MIT

Tag summary

Content type

Image

Digest

sha256:4b1b523fe…

Size

11 MB

Last updated

6 months ago

docker pull taymour/elysiandb