BBB’s different storage systems
MongoDB
Bigbluebutton uses Mongo DB to store most of its data, eg. userIds, meetingIds, presentationIds, and emoji choices. Mongo DB is a NoSQL database system that doesn’t use tables. Instead, it uses JSON objects. One to many relationships between 2 objects are shown using nesting of objects.For example: One Product object can be made of many Parts objects

Here is the Part object

localStorage and sessionStorage
For a user’s UI Settings however, our project uses localStorage because :Advantages:
-
Simple to set and get values:
- localStorage.setItem('myCat', 'Tom');
- sessionStorage.setItem('key', 'value');
- The Storage component is already available in all major new browsers. You don't have to use any particular packages, although we wrap Storage in our own component to add more methods
- The settings UI data doesn’t need to persist once the user logs out, since a new userId is issued to a user every time they open BBB
- the settings UI data does not need to be highly secure
Disadvantages:
- This type of storage doesn’t deal with race conditions
- No DB query syntax, therefore doesn’t scale well
Why localStorage and not sessionStorage?
localStorage has no expiration time, whereas sessionStorage is cleared once the browser window is closed. In the future, we would like to load user UI settings based on the userId. But currently, we do not have a system for storing users at all. By using localStorage we are future proofing BBB so that when a user logs in, their localStorage will still be available and populated with their UI setting choices.References:
William Zola: MongoDB Schema DesignMozilla: localStorage
Mozilla: sessionStorage
Comments
Post a Comment