# UStore

> Transactional blobs, documents and graphs on local NVMe, behind one C ABI

## Engines

Every engine implements the same C ABI of `ustore/db.h`, `ustore/blobs.h` and `ustore/strings.h`, and documents, graphs and strings run on top of any of them.
A program links only the engines it opens.

| Engine    | Role                  | Storage                        | Transactions | Snapshots | Collections |
| :-------- | :-------------------- | :----------------------------- | :----------- | :-------- | :---------- |
| `ram`     | reference, in memory  | memory, with an optional image | yes          | yes       | yes         |
| `nvme`    | hyper-converged, v1   | LSM trees on NVMe or files     | yes          | no        | yes         |
| `rocksdb` | baseline, third-party | LSM tree on a filesystem       | yes          | yes       | yes         |
| `leveldb` | baseline, third-party | LSM tree on a filesystem       | no           | yes       | no          |

## Modalities

Blobs, documents and graphs share one keyspace per collection and stage into one transaction, so a write touching all three commits or aborts together.
Documents are addressed by JSON Pointer and modified by JSON Patch and MergePatch, with no query language in between.
Graphs are directed multigraphs with identified edges, stored beside the documents they relate.
