alkemio
alkemio copied to clipboard
Serverside master for Whiteboards
Description
The current whiteboards multiuser setup is based on the first Excalidraw's implementation of collaboration. This implementation is buggy and producing problems because the synchronization of elements in the whiteboard between connected users is produced in each of the clients.
We are facing desynchronization issues, inconsistencies, problems with the images and also the the websocket gets flooded with too many irrelevant messages (MOUSE_LOCATIONs) when there are too many users connected to the same whiteboard.
But the biggest problem is that the whiteboard only lives on the browser's window, the server is just a message dispatcher, so saving is responsibility of the clients that are editing the whiteboard. This causes problems when we have these inconsistency issues described before.
Initiative / goal
Usable + reliable multi-user whiteboards
Hypothesis
With this new architecture, whiteboards should be more stable and reliable
Acceptance criteria and must have scope
- [ ] Validating the excalidraw approach + is available for us to use, and what timelines they are looking at
- the whiteboard to live in the server. We'll have the conflict solving algorithm only running in the server and the clients will be synchronized from it.
- [ ] The whiteboards are more reliable and all the code to reconciliate elements lives in the server.
- Whiteboards do not need to be saved
- Whiteboard server state is saved every 5 min to the db
- Upon last user leaving the excalidraw (websocket) room is closed + the whiteboard is saved
- We want the clients to send messages that modify that server master copy and receive the modifications from other clients.
- We want the action Undo to work well and only undo the action of the user that requested to undo.
Stakeholders
https://github.com/excalidraw/excalidraw/pull/7348 Development
QA
Excalidraw
Timeline
Q1
Former Description (title: Whiteboard: Safe undo + history; scalability)
Description
A robust architecture for collaboration on multiple types of content: whiteboard
Initiative / goal
That multi-user white boards are a key value add for the platform. Collaboration on the platform in real time
Acceptance criteria and must have scope
- [ ] Whiteboards have a server state that is reconciled with a safe algorithm
- [ ] Usage of shared state across containers (e.g. redis) as an alternative to the current broadcast mechanism
- [ ] Usage of y.js protocol for conflict resolution (better scalability)
- [ ] Creation of collaboration setup that can also be re-used for document editing (markdown / hocuspocus)
Stakeholders
Process guides Product
Timeline
tbd
Design
tbd