b******y 发帖数: 126 | 1 Say you need to design a web application which needs to support friends of
friends function(like in linked in, when you search a person, it will show
you if this person is linked with you, your connection or your connections'
conection...), we expect to have millions of users and each user may have
thousands of friends, how would you design/implement this function to make
it scalable. | b******y 发帖数: 126 | | x*****p 发帖数: 1707 | 3 This is typically a bigraph. Each user is a node. Two users have an edge if
they are friends. | b******y 发帖数: 126 | | b******y 发帖数: 126 | 5 But where do you hold the data, if use the database what is the strategy to
read the data, if put them in cache, what is the strategy to keep them
synchronized. |
|