I'm developing dating app for vk.com (it is Russian facebook), so I need to keep social graphs (profiles linked by mutual interests, friends, favorite music, movies, etc). It looks like "user A closest to user B than user C because they have 2 mutual friends and 5 mutual interests VS 1 mutual friend and 4 mutual interests", "user C is closest to ...", etc. What is good solution for this problem? I know theory of graphs from math, but I've never worked with graphs in computer science yet (I'm web-developer), I think that this problem can be solved by generating graph for any user and keeping it in NoSQL database (like mongo or redis), but it is bad solution (no realtime changes, generation will take long time). What you think about this problem?
One option you could consider is FlockDB (Neo4j has already been mentioned) by Twitter. If your problem space is simple queries on a large scale this might be suitable. It doesn't support graph walking queries like Neo does, but is used by Twitter to store their social graph and supports queries such as 'Who does A follow' etc.