I have encountered the biggest challenges in my prosemirror editor with Yjs and Y.PermanentUser.
In my project, I broadcast all the updates got from one client to all other clients instead of have a shared doc on the server side and all works as expected at first. However recently i find that when too many people participate in editing the same doc, system collapsed.
I have checked the reason, as i mention above: " I broadcast all the updates got from one client to all other clients instead of have a shared doc on the server side ", if the server have no shared doc and only broadcast updates, i have to broadcast encodedState at first to ensure that each client’s document can always sync. in that case if one client’s encodedState’s byte size is 200k, 12 people would be about 2m size of updates only for sync each other, it would be much larger if i encode the update to base64.
Besides, without shared doc and only broadcast client’s updates, the timing of broadcast encodeState is bothering me quite a lot…The benefits of shared doc is that it only sync shared doc with one client by stateVector and broadcast only the diffs.
I don’t know where to go …