Semurg as a key-value store: put, get, delete, and where it stands
12 October 2026 · Semurg · 3 min read · Markdown
Verified: every command below ran on a fresh node of r11.78.20261012.bc0d94f (how)
A key-value store answers one question very often: what is stored under this key? Semurg answers it with the same door it uses for objects and documents: a value under a whole-number key, read back by key. This post is about using that door as a key-value store, and about where it stands while its comparison is re-measured.
Put, get and delete
Keys are whole numbers; values are base64 bytes. One call puts many, and "content": true makes it a put-if-absent: a key that already holds a value keeps it, and the reply counts it as skipped.
export SEMURG_API_TOKEN=<your token>
curl -sS http://localhost:4000/v1/query \
-H "Authorization: Bearer $SEMURG_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"op": "object_put", "content": true,
"objects": [{"id": 900000000701, "value_b64": "c2Vzc2lvbjogZGFuYQ=="},
{"id": 900000000702, "value_b64": "c2Vzc2lvbjogbGVl"}]}'Expected: both keys are written, because neither held a value
Run that put a second time, before anything else, and both keys are skipped. Without "content": true, a put to a key that holds a value replaces it with a new version, and reads return the newest.
Get many keys in one call; each answers in the order you asked:
export SEMURG_API_TOKEN=<your token>
curl -sS http://localhost:4000/v1/query \
-H "Authorization: Bearer $SEMURG_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"op": "object_get", "ids": [900000000701, 900000000702, 900000000799]}'Expected: the two keys you put are present with their values, and the third is absent
Delete a key:
export SEMURG_API_TOKEN=<your token>
curl -sS http://localhost:4000/v1/query \
-H "Authorization: Bearer $SEMURG_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"op": "object_delete", "ids": [900000000702]}'Expected: one key deleted
Read it again and the key answers deleted, with the version it was deleted at, rather than pretending it never existed:
export SEMURG_API_TOKEN=<your token>
curl -sS http://localhost:4000/v1/query \
-H "Authorization: Bearer $SEMURG_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"op": "object_get", "ids": [900000000702]}'Expected: the deleted key answers deleted
Where it stands
We have taken our published benchmark rows down while every domain is re-measured on new hardware, with a dataset in RAM and one bigger than RAM running at the same time, as a stress test of Semurg itself. The re-measured key-value results will be on the benchmark page, wins and losses alike, with the release and the machine they ran on. Until then this post states no comparison.
What it does not do yet
- Expire keys after a time to live.
- List, scan or range over keys.
- Compare-and-set, increment or append: a put writes the whole value.
- Use string keys directly.
- Import from Redis or Valkey directly.
Next
- A document store that reads by id: the same door, for JSON documents.
- An object store on your own disks: the same door, for large values.
How these commands were checked
Our test farm ran each of the 4 command blocks marked runnable, exactly as written, with the answer checked against the expectation printed under it, against a fresh node of the published release r11.78.20261012.bc0d94f. A post is published only when every one of them passed there.