Comment by blixt

1 day ago

I agree. In theory you need to just distribute serialized patches but in a real world backend scenario you may need to integrate with knowledge of current document state, user identity, and possibly even some level of access control.

I’ve wanted to use Y.js with a Go backend multiple times but gave up each time due to time constraints as it’s hard to find simple reference implementations.

I’ve been checking back over the years but it still seems hard to do this outside of Node.js.

Same experience. Go is my default choice for backend too

It can easily be a full time job

You need to mirror all logic and encoding/decoding part

https://github.com/yjs/yjs/blob/main/src/utils/encoding.js

https://github.com/yjs/yjs/commits/main/src/utils/encoding.j...

I was thinking about spining off nodejs instance just for persistence and syncing with postgres

Fyi, building a collaborative editor right now and it's still hard to do outside of Node

  • Still better time spend than doing leetcode.

    It's my go-to argument against leetcode style interviews.

    I would rather ask a candidate to spend 30 mins and do research together on collaborative editing, or visualizing distances used in pgvector or similar vector database.

    Imagine how far the whole colabarative editing space moved forward if 1% of leetcode grinding were rerouted