jazyx / vdvoyom

Meteor app for language teachers to play interactive games online with students
0 stars 0 forks source link

History should be detached from User docs #137

Open blackslate opened 4 years ago

blackslate commented 4 years ago

MongoDB prefers documents which do not constantly grow. A separate doc for each user connection would be better for performance:

{ _id: <>
, user_id: <>
, group_id: <>
, start: <>
, end: <>
, follows: <History._id from same session>
}

For groups with multiple users, this would give us the possibility of checking who participated in the group at what time. The complete thread for a user who changes groups during the same session can be tracked through the follows property.

This assumes that a Group record will exist even for a User without any teacher.