Unfortunately I’m still quite confused about some details and workflow between the ydoc, provider, awareness, room… end goal, a shared space with breakout rooms + one main room. So ~ 25 people in a group shared space, everyone sees 1 main document (ie. code from teacher) while working in splitscreen on their own document (alone and/or with others – jumping between them when help is requested).
So far, I’ve sucessfully used 1 Y.Doc (with 4 unique getText
id’s), 1 provider (so 1 awareness) and multiple rooms – to serve 4 unique spaces in parallel. Now I could simply hide most of them unless selected… however with the shared awareness across all rooms, it might not be possible to keep track of who is actively looking at/focused on a given room? Ooor this logic should just be passed through the shared awareness of the single provider (which space is focused on)?
Could someone recommend one of the following:
- separate ydoc, provider, room per space to be viewed (so each client has multiple everything active, regularly switching with them all open, but semi-silent, hidden in the background)
- 1 ydoc with unique
getText()
ids, 1 provider, unique rooms, - similar to above, but using awareness to keep track - something totally different: ____________
Ideally students could merge the contents of the ‘main’ document (likely read only for them) into their own working document - of which, the document updates provides plenty of examples for merging whole ydoc’s, but what about only merging/applyUpdate from one getText()
section to another?
I’ve had checked out other / threads – but Yjs dev moves so rapidly (woohoo) that it seems some discussions from 1 year ago are less relevant, given that the websocket provider can do multi-plexing, allowing for multiple rooms in parallel. Lastly, tried reading up on subdocuments, but not so sure if that’s even necessary for this workflow.