Note that there are some explanatory texts on larger screens.

plurals
  1. POPulling wall/dashboard data like facebook, twitter, tumblr, etc
    primarykey
    data
    text
    <p>I feel this must be asked elsewhere, but I couldn't figure out the correct search words to find an answer. If this is a duplicate, please point to correct response elsewhere.</p> <p>Services like Facebook, Twitter, Tumblr, and I'm sure a whole host of others allow you to follow other users. Their posts then appear on a wall or dashboard. I'm wondering how, with such large data sets, these services can pull posts so quickly. I assume they are not using a SQL server and they are not doing something like:</p> <pre><code>SELECT * FROM `posts` WHERE `poster_id` IN ( super long list of users being followed ) ORDER BY `date` LIMIT 10; </code></pre> <p>As the above could have a very large list of user ids in it, and it likewise wouldn't work very well with sharding, which all these large services use.</p> <p>So, can anyone describe what kind of queries, algorithms, or databases these services use to display the followed posts?</p> <p>Edit: Thanks for everyone's responses. It seems like the most likely way of doing this is via a graph database such as GraphDB, Neo4j or FlockDb, the latter of which is Twitter's graph database. With Neo4j, it is done something like what is documented at <a href="http://docs.neo4j.org/chunked/milestone/cypher-cookbook-newsfeed.html" rel="nofollow">http://docs.neo4j.org/chunked/milestone/cypher-cookbook-newsfeed.html</a>.</p> <p>Of course, Google, Facebook, etc., all have their own, internally built or internally modified databases for their unique use cases.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload