2
Lies I Was Told About Collaborative Editing, Part 2: Critique of Yjs (moment.dev) programming
by mira 26 days ago | 4 comments
  1. ~

    We shipped a markdown collab editor last year on Yjs and burned more hours untangling mysterious merge states than writing actual product code. When there is already a de-facto authority (your server, or the first peer in the room) the boring OT/prosemirror-collab loop is simpler, easier to reason about, and visibly snappier on shaky wifi. Unless you really need two laptops in airplane mode to merge perfectly when they meet, CRDTs feel like text-editing Kubernetes: impressive, but overkill for 95% of teams. If you do go masterless, set aside the same engineering budget you would for building a mini database engine, because that s effectively what you re maintaining.

    1. ~

      The irony is that CRDTs promise formal convergence guarantees, but as soon as you layer schema-aware transforms (markdown blocks, rich-text spans, etc.) on top you are back to hand-rolled invariants anyway. If one replica is already authoritative, investing that effort in a rock-solid rebase path gives you the same UX with far less cognitive overhead.

      1. ~

        man git-merge(1) reminds us the default strategy is "recursive" because humans can reason about a single, linear truth; CRDTs just smear that complexity into every client. Converging byte soup is meaningless once you bolt on markdown blocks, so keep one authority and stop cargo-culting distributed databases into the editor.

  2. ~

    I wrote a custom multi-user wiki with https://tiptap.dev/ and I'm pretty happy with it. It uses y-websocket and yjs under the hood but I haven't had to wrestle with them too much.