FeOxDB
problem
Caches, sessions, queues and other derived state have to be fast and should survive a restart, but rarely need an fsync on every write. Embedded stores usually either block on fsync or keep everything in memory.
solution
A lock-free in-memory index with write-behind persistence through io_uring, a durability window that is bounded and documented, and an explicit flush for writes that must be synchronous. feox-server adds the Redis protocol on top.
results
GET in about 200 ns and INSERT under 1 µs on an M3 Max. feox-server runs about twice Redis’s throughput on mixed workloads. It is also the storage engine under Orvena. feoxdb has about 200 stars on GitHub and feox-server about 85.
Architecture
Reads are answered from an SCC hash map and never touch the disk; a crossbeam skip list serves ordered scans. Writes update the index and land in per-shard buffers, and background workers batch them to the device through io_uring.
durability
A durability window you can calculate
Buffers flush every 100 ms or when a shard holds 16 MB. Shards drain in parallel, so the worst case is 100 ms plus the time to write 16 MB at the device’s 4 KB random-write speed, with at most 16 MB per shard at risk. A caller that needs fsync semantics calls flush and waits.
recovery
Crash-safe updates
An update persists the new record before it frees the old record’s sectors, so a crash at any point leaves either the old value or the new one. Records and metadata are checksummed, allocation is journaled, and on open the store rebuilds its index and free-space map by scanning the device.
benchmark
feox-server against Redis
feox-server runs one thread per core on top of FeOxDB. Same machine, redis-benchmark with 1M random keys, 50 clients and pipeline depth 64, plus mixed workloads. Pub/Sub doesn’t touch storage and is slightly slower than Redis.
from the feox-server README benchmark tables