A Pragmatic Approach to Live Collaboration
Sep 24, 2020

Summary
This post introduces and details the 'Atomic Operations' (AO) approach to implementing live multi-user editing in the Hex Logic View. AO decomposes state mutations to single property updates, preventing conflicts between different operation types. For same-type operations, a central server maintains a monotonic counter per object to resolve conflicts using a 'last writer wins' semantic. The implementation was designed to be incremental and compatible with Hex's existing stack (Apollo, GraphQL, TypeScript, PostgreSQL).