News for hackers. Stuff that matters.
Re:Supabase – Realtime: Multiplayer Edition by qwertox on Thursday August 18, 2022 @02:47PM (#32513407)
Related to this is also an example from ProseMirror (which TipTap uses as the editing component) [0][1]

I'm not completely sure, but I think at ProseMirror they're using Yjs [2] for the collaborative editing part. If not, checking out Yjs is worth it in and of itself.

> Yjs is a CRDT implementation that exposes its internal data structure as shared types. Shared types are common data types like Map or Array with superpowers: changes are automatically distributed to other peers and merged without merge conflicts.

> Yjs is network agnostic (p2p!), supports many existing rich text editors, offline editing, version snapshots, undo/redo and shared cursors. It scales well with an unlimited number of users and is well suited for even large documents.

> Conflict-free replicated data types (CRDT) for collaborative editing are an alternative approach to operational transformation (OT). [3]

OT was what Google Wave was based on and I think current colab editing in Google Docs and other of their office products use this.

[0] https://prosemirror.net/examples/collab/#edit-Example

[1] https://marijnhaverbeke.nl/blog/collaborative-editing.html

[2] https://github.com/yjs/yjs

[3] https://github.com/yjs/yjs#Yjs-CRDT-Algorithm

Re:Supabase – Realtime: Multiplayer Edition by jahewson on Thursday August 18, 2022 @04:10PM (#32514292)
> I think at ProseMirror they're using Yjs

No, ProseMirror has its own approach to sync.

> OT was what Google Wave was based on and I think current colab editing in Google Docs and other of their office products use this.

Yep.

Re:Supabase – Realtime: Multiplayer Edition by samwillis on Thursday August 18, 2022 @05:04PM (#32514884)
ProseMirror has its own OT system developed by its lead developer. However the developer behind Yjs has created Yjs bindings for it that are first class!

The team behind TipTap (built on top of ProseMirror), created the Hocuspocus server backend for Yjs and collaborative text editing.