I have some doubts about how Reddit and Hacker News manage to store such amount of news and comments while keeping all their rankings updated. I guess they must keep everything in memory 开发者_运维知识库using some kind of Tree structure, right? (news are parent of comments which are parent of other comments, etc.). Do they keep all news in memory? or just the last ones? do they constantly update all news ranking? or just the last ones? Hope you can help me! Thanks
Regarding Storage IMHO, sites such as Reddit and Hacker News would seldom use a single store. Browsing through Reddit's github, I notice memcached, Cassandra as well as some SQL scripts.
Regarding News Ranking Yes, it is constantly updated based on various factors (submission time, up/down votes, relative weights of tags, etc.). You may want to read the following
- How Reddit ranking algorithms work
- How Hacker News ranking algorithm works
- Ranking algorithm used at linkibol
精彩评论