-
Notifications
You must be signed in to change notification settings - Fork 1
Voting system
K Sashi Kumar edited this page Jul 25, 2017
·
2 revisions
Each user's upvote or downvote are not stored directly in the database. Each record data for each vote means that there would be 10X the number of records of discussion/answer. So, the approach we take is: store each user's vote to post mapping in redis. Each time the user login to the app, the redis key is created and for each logout, the redis values are dumped to MongoDB. The dumping part is yet to be handled.
The code for this is found in: lib/meta_info/vote.rb