Hello!
I am thinking about how to organize data storage in one potentially highload project, I decided to consult. The task is this: there is a list of "candidates" (~ 20 pieces), there are people who give a ball to everyone (at a time). It is necessary to display the current rating of candidates, i.e. After each vote you need to recount ~ 20 numbers. What are the options:
- Just take PostgreSQL and save user voices in a table. Rating calculation occurs in the application code, and is cached.
- Again, use a relational database, but in addition to saving user votes immediately store a recalculated rating in a certain table. To recalculate the rating, use the message queue, or do it by crown.
- The first way, but use NoSQL solution.
- The second way, but use NoSQL solution.
I tend to NoSQL database and caching rating calculation, without denormalization. What would you do?
Thank!