from Hacker News

Collaborative text editing with Eg-Walker: Better, faster, smaller

by czx111331 on 9/27/24, 12:53 PM with 31 comments

  • by britannio on 9/27/24, 4:01 PM

    Joseph explains the algorithm on YouTube too: https://www.youtube.com/watch?v=rjbEG7COj7o

    It's great work, combining the best of OT and CRDTs.

  • by matlin on 9/27/24, 2:31 PM

    Seph (author) also has a reference implementation in Typescript: https://github.com/josephg/eg-walker-reference

    I've stated before that I think the main thing holding back collaborative text / sequence CRDTs is integration with a production database.

    Eg-walker looks interesting because it might lend itself to be integrated into a database because the operations are immutable and only appended. However, to demonstrate the effectiveness of these algorithms library authors (see Yjs, DiamondTypes, etc) build stand-alone data structures (usually specialized search trees) that most databases already provide.

    Personally, I've been trying to adapt a Piece Table[1] to be collaborative and stored in Triplit[2] which runs on both client and server and already implements logical clocks but I might see how well I can adapt this algorithm instead!

    1. https://en.wikipedia.org/wiki/Piece_table 2. https://github.com/aspen-cloud/triplit

  • by no1youknowz on 10/7/24, 12:38 PM

    I've seen a comment from the YT page:

    > While the downside of OT is p2p, the one up side is that you get GIT like history that is super valuable for us especially if we want to build a CDC system.

    How trivial would it be, to implement a CDC system from a CRDT. Does anyone know any github repos or any documentation I could refer to? Thanks

  • by abdullahkhalids on 9/27/24, 5:10 PM

    Do collaborative whiteboard like software use the same algorithms, or are there more suitable algorithms for picture collaborations?
  • by Palmik on 9/28/24, 7:10 AM

    Saw the YouTube video when it was first posted, and it could be a great match for a new project I have in mind.

    Is there a practical implementation yet that supports not just strings, but also lists and maps?

    Would be great to see it integrated into yjs / y-crdt.

  • by eclectic29 on 9/27/24, 3:43 PM

    If Martin Kleppmann is the author I know this stuff will be worth watching out for.
  • by canadiantim on 9/27/24, 3:29 PM

    Looks like amazing work, congrats!! Excited to see implementations in the wild, definitely would be keen to play around with.
  • by 1attice on 9/27/24, 3:14 PM

    s/e.g./EG/