Collaborative Features
We want to introduce collaborative editing features.
For this, we will add an edit key to each scene.
Necessary Changes:
-
Move Scenes to their own DB (scenelinks creates its own sqlite) -
Add a new field "key" to the DB table for links -
When a user generates a new scene, generate a new random key and create two links: one with the key as an added argument and one without. Store the key in the database. -
When a user sends a SceneMessage and has the edit key, append it to the SceneMessage -
When the server receives a SceneMessage with an edit key, check if it fits the scene and update the stored scene (maybe debounce this so it gets updated once a second max)
We will also create Entities.
-
Entities are persistent objects that get stored in the DB (extra table in Scene DB) -
Entities belong to a room -
Entities get updated and their history can also be stored at some predefined granularity -
Users get created as user entities with their position and camera view direction -
Annotations are entities with a position, a username that created them, and some text -
Measurements are entities with two positions and a username that created them and some text -
Scale objects are entities with a position and a user ... -
Sensors are entities with a position and a measurement -
In the frontend, you can follow an entity. If it's a user, you get its perspective. If its a sensor, keep it in focus.
Entities can only be created if the correct edit key for the scene is used (maybe relax this for user entities).
Edited by Valentin Buck