Dev.Lib
arrow_backBack to Blogs
LEVEL_1010.8June 27, 20261 min read

Conflict resolution models

Frontend Architecture

LWW, vector clocks, CRDT merge, server authoritative reject — pick per domain (notes vs inventory).

Summary

LWW, vector clocks, CRDT merge, server authoritative reject — pick per domain (notes vs inventory). UI exposes conflicts users care about; auto-merge the rest. Ties to 6.10 Offline conflict resolution and 8.8 CRDT basics.

Code example

function resolveConflict(local, remote) {
  if (remote.version > local.version) return remote;
  if (local.version > remote.version) return local;
  return { ...remote, merged: true, body: mergeText(local.body, remote.body) };
}

Key points

Further reading

Related concepts