From 6ff31e087f372139ef47800ecb4545853d07ab35 Mon Sep 17 00:00:00 2001 From: Jerome Gravel-Niquet Date: Fri, 22 Sep 2023 14:11:06 -0400 Subject: [PATCH] Small doc tweaks (#67) * add information about how conflict resolution happens * README tweaks --- README.md | 2 +- doc/crdts.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 51aa4f76..eaaaea39 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Getting state (data) from a central remote source can be incredibly expensive (a ### Fast, eventual, consistency -Strong consistency by RAFT consensus can be too slow. Eventual consistency works for our use case, if it's fast. +Many use cases can cope with eventual consistency, especially if a consistent state is attained sooner than later. Raft fell short for some use cases at Fly.io where round-trips to a centralized location are too expensive. ### Flexibility diff --git a/doc/crdts.md b/doc/crdts.md index 8b6c715f..ff5b6f5d 100644 --- a/doc/crdts.md +++ b/doc/crdts.md @@ -12,6 +12,10 @@ Corrosion uses the [`cr-sqlite` SQLite extension](https://github.com/vlcn-io/cr- `cr-sqlite` provides functions to mark tables, in a SQLite database, as backed by CRDTs. These include Causal-Length ([pdf paper](https://dl.acm.org/doi/pdf/10.1145/3380787.3393678)) and Last-Write-Wins (LWW). +As of cr-sqlite 0.15, the CRDT for an existing row being update is this: +1. Biggest `col_version` wins +2. In case of a tie, the "biggest" value is used. + ### Basics With the extension loaded, writes to CRDT-backed tables will trigger insertions in internal tables for each column in a row.