3 comments

  • wim28 minutes ago
    We&#x27;re building a multiplayer IDE [1] but for docs&#x2F;planning where docs needs to be trees&#x2F;graphs (to support outlining, refs, transclusions and so on)<p>We can&#x27;t just merge any type of operation by replaying unconditionally, because that can cause tree cycles for example. Like the linked list certain operations can be valid locally for an offline client, but not globally in the converged order.<p>Our sync engine distinguishes between different types of operations: unconditional operations and guarded operations.<p>Unconditional operations can&#x27;t violate structural&#x2F;data-model invariants. For example SetCompleted(task_guid, true). Simple last-writer-wins.<p>Guarded operations can mutate topology, like InsertMove(node_guid, parent_guid, after_guid). These are checked against the current state, not the state when they were created. During replay we first revert optimistic local operations and replay the incoming canonical operations in order. The mutator function for each operation validates the current state before applying it and if it would violate a condition (for example by creating a cycle because another client made another move in the meantime) it is deterministically rejected. In our case we also have an authoritative server so we can also use the same guarded operations for conditions beyond data structure, like permissions, so the AddUser(workspace_guid, user_guid) mutator function can check permissions state first for example.<p>[1] <a href="https:&#x2F;&#x2F;thymer.com" rel="nofollow">https:&#x2F;&#x2F;thymer.com</a>
  • alexisread2 hours ago
    Relevant paper on lattice types (BloomL): <a href="https:&#x2F;&#x2F;dsf.berkeley.edu&#x2F;papers&#x2F;UCB-lattice-tr.pdf" rel="nofollow">https:&#x2F;&#x2F;dsf.berkeley.edu&#x2F;papers&#x2F;UCB-lattice-tr.pdf</a><p>In addition to this, you’ll need a causal register (per-key merkle clock) to order concurrent edits, rather than drop one.<p>Lastly, you’re likely to need a Pijul style VCS to handle semantic merges.
  • Animats1 hour ago
    This is apparently based on Automerge.[1] It sounds like a really good idea. Is it a good enough idea to sync MMO game clients and servers?<p>Paper from 2012, last Automerge site update in 2025. Why isn&#x27;t this everywhere?<p>[1] <a href="https:&#x2F;&#x2F;automerge.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;automerge.org&#x2F;</a>
    • josephg10 minutes ago
      &gt; Is it a good enough idea to sync MMO game clients and servers?<p>After 15 years in the trenches on this stuff, no I don’t think so. Some operations need a clearly defined order for correctness. For example, financial transactions or items moving between inventories. CRDTs don’t provide this.<p>CRDTs are great when it makes sense for a local peer to own changes. Like Git. I think automerge and friends would make for excellent tools for <i>making</i> virtual worlds. For example, the recent work to integrate automerge into the Godot game engine.
    • SupperOfTheLamb1 hour ago
      They say in the article: the correct resolution of a merge depends on the context. Automatic resolution may introduce bugs!