Settings

Theme

Show HN: Cuttlefish – 40ns causal consistency using algebra instead of consensus

github.com

2 points by yousef06 a month ago · 0 comments · 2 min read

Reader

Distributed systems usually pay milliseconds for correctness because they define correctness as execution order.

This project takes a different stance: correctness is a property of algebra, not time.

If operations commute, you don’t need coordination. If they don’t, the system tells you at admission time, in nanoseconds.

Cuttlefish is a coordination-free state kernel that enforces strict invariants with causal consistency at ~40ns end-to-end (L1-cache scale), zero consensus, zero locks, zero heap in the hot path.

Here, state transitions are immutable facts forming a DAG. Every invariant is pure algebra. The way casualty is tracked, is by using 512 bit bloom vector clocks which happen to hit a sub nano second 700ps dominance check. Non-commutativity is detected immediately, but if an invariant is commutative (abelian group/semilattice /monoid), admission requires no coordination.

Here are some numbers for context(single core, Ryzen 7, Linux 6.x):

Full causal + invariant admission: ~40ns kernel admit with no deps: ~13ns Durable admission (io_uring WAL): ~5ns

For reference: etcd / Cockroach pay 1–50ms for linearizable writes.

What this is:

A low-level kernel for building databases, ledgers, replicated state machines Strict invariants without consensus when algebra allows it Bit-deterministic, allocation-free, SIMD-friendly Rust

This is grounded in CALM, CRDT theory, and Bloom clocks, but engineered aggressively for modern CPUs (cache lines, branchless code, io_uring).

Repo: https://github.com/abokhalill/cuttlefish

I'm looking for feedback from people who’ve built consensus systems, CRDTs, or storage engines and think this is either right, or just bs.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection