devlog@whatnext
Keeping a distributed queue in sync without a server round-trip
The core problem in WhatNext: multiple people add tracks to a shared queue from different devices, and everyone should see the same order fast, without round-tripping to a central server on every reorder.
The approach I'm testing
A CRDT-ish ordered list keyed by fractional indices. Each insert picks a position between two existing keys, so two clients inserting concurrently rarely collide.
| Strategy | Conflict rate | Complexity |
|---|---|---|
| Integer indices + lock | high | low |
| Fractional indexing | low | medium |
| Full CRDT (RGA) | none | high |
Starting with fractional indexing — it's the cheapest thing that survives concurrent edits. I'll revisit a full CRDT only if rebalancing becomes a problem.