Technical Note: vault G. Corpas <- Portfolio github.com/gcpino/vault

vault — Persistent C11 Key-Value Store

Abstract

Compact persistent key-value store (~605 LOC) with a write-ahead log, snapshots, read-write locks, and an edge-triggered Linux epoll TCP server.

1. Request Flow

TCP client (or built-in CLI)
  -> epoll event loop (EPOLLET + O_NONBLOCK)
  -> Line protocol: SET / GET / DEL / EXISTS / KEYS
  -> pthread_rwlock_t (parallel reads, exclusive writes)
  -> 1024-bucket FNV-1a chained hash table
  -> Append-only WAL (O_APPEND) + point-in-time snapshots

2. Design Notes

3. Summary

Size
~605 LOC C11, compiled with -Wall -Wextra -Werror
Limits
256 B max key, 64 KB max value, 1024 hash buckets
Tests
End-to-end TCP integration test (SET, GET, EXISTS, DEL)