1 Real Time Collaboration Research
Benjamin Goisser edited this page 2026-02-06 17:10:15 +01:00

Research Results, thus far

Current Recommendation:

  1. Use LiveBlocks or TipTap Free Tier
    • May be the simplest solution? We may run into limitations due to the free tier
    • TipTap seems a bit more comprehensive then LiveBlocks, the later just seems to be a synchornization backend + plugins
  2. Implement a simple spring backend for y-websockets (the reference implementation seems reasonably simple)
    • Simple at first glance, may turn out to be very complicated.
  3. Use the automerge-java library
    • Library seems to be an FFI binding to the Rust native code of automerge
  4. Write (part of?) backend in TypeScript and use yjs, automerge, or ot.js
    • Plenty of frameworks and options, but requires two backends
  5. Use yjs on frontend and run a y-redis backend (backed by PostgreSQL)
    • Requires PostgreSQL, Redis and JS backend
  6. Implement own CRDT (e.g. Logoot) based on other half-ready implementation on the internet.
    • Error-Prone and will result in a suboptimal result

Side-note regarding Editors: We could consider using CodeMirror instead of Monaco. Code Mirror offers less things out-of-the-box, but is better documented, easier to embed, smaller and more flexibel. Elixir LiveBook switched from Monaco to CodeMirror. ProseMirror also seems to offer some collaboration features. Other options include e.g. Lexical.

Side-note regarding Undo: The undo feature may be very difficult to implement in a concurrent setting.

Side-note regarding Java: It seems to be exceptionally difficult to find anything working which is not JS/TS or Rust

Ideas

Operational Transformations (OTs)

Idea: Each change from each user is given a unique incrementing ID by the server. Changes are then ordered by the ID and applied. In conflict situations, changes may need to be combined/transformed to resolve conflicts for a client. Relatively simple design, but the transformation logic (e.g. combining changes and resolving conflicts) may be challanging to implement. Does not guarantee a consistent state across clients.

Libraries:

Links explaining:

Conflict-Free Replicated Data Types (CRDTs)

Algorithms where replicas of a document can update concurrently. Merges are guaranteed to be consistent without the complicated merge algoritms of OTs. Supports offline editing and syncing. Based on Eventual Consistency, which itself is the base of many NoSQL-Databases (e.g. Redis). Several useable algorithms, WOOT, LOGOOT and RGA are available.

Libraries:

Links explaining:

Differential Synchronization (DS)

Alternatives

Other

Deprecated or not-production-ready libraries, as a reference