Guys, I cloned y-websocket server and I’m trying to implement a postgresql adapter with
writeState, but when
bindState is called with the data from the database and it will apply Y.applyUpdate, the clients go out of synchrony.
Someone already used
bindState? Also, I’m converting the doc as Uint8Array to base64 to persist in the database using
Here is a code example, with a client and an API to persist, https://github.com/iamgbayer/collaborative-poc/blob/master/packages/api/src/persistence.js#L23
When I comment
Y.applyUpdate code, all clients stay synced.
Yjs is making an awesome environment to build collaborative systems, thank you all.