diego2013 / CSR_Meteor

CSR prototype III. Implementation using the Meteor platform
1 stars 1 forks source link

Why do we have scenario ACK as separate document? #138

Closed diego2013 closed 8 years ago

diego2013 commented 8 years ago

Why do we have a separate document for scenario AKCs? Right now these "likes" are persisted in a separate entity scenarioACK, which as ID the concatenation of scenario Id and user ID. The two other fields are the scenarioID and userID.

I don't know what is the rationale for this against an embedded list of userIDs in the scenario Document. With the latter approach counting the number of ACKs would be the list size. Most expensive operation would be to check if a user ID is in the list O(n).

With the current approach we are creating a lot of documents.

diego2013 commented 8 years ago

Indeed this is a way too artificial way of implementing this. As discussed, it would be better to have an array of user IDs. Correcting this on branch issue138.

diego2013 commented 8 years ago

Implemented in v0.1.3