Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How would you implement twitter using a noSQL kind of DB?

It seems like implementing web-app like twitter/facebook-wall needs 1 huge "feeds" relational table (+ a user table) and an awesome caching mechanism.. ( can you recommend one? )

my main question is, how would you implement such a "feature" using a non-relational DB, e.g. a key/value kind of DB?

Obviously, I had like to support the amount of users using twitter concurrently and in general.

Thanks

like image 959
DuduAlul Avatar asked Jul 12 '10 12:07

DuduAlul


People also ask

How does Twitter use NoSQL?

Manhattan NoSQL Eventually Consistent Data Store Manhattan is a real-time multi-tenant scalable distributed database used at Twitter to serve millions of queries per second with really low latency being highly available. It stores user tweets, direct messages, account details & much more.

Which NoSQL database is used by Twitter?

Twitter was built on MySQL and originally all data was stored on it. We went from a small database instance to a large one, and eventually many large database clusters.

Why NoSQL database is mostly used in social media platforms?

NoSQL databases can handle unstructured, semi structured and structured data and they are highly scalable, reliable and easy to use. Unstructured data can be in any form like audio, video, social network data, documents etc.

Is NoSQL good for social media?

NoSQL is a perfect solution when designing social network apps. Probably developing your social network with MySQL may be easier at start, but later, when the app grows and the number of users grows too you will have to think how to manage a MySQL cluster, dealing with master-slave configs, etc.


2 Answers

You can read how twitter did it over here: http://highscalability.com/blog/2010/2/19/twitters-plan-to-analyze-100-billion-tweets.html

Also read this: http://highscalability.com/scaling-twitter-making-twitter-10000-percent-faster

No data models but quite a lot of information about how ;)

like image 98
Wolph Avatar answered Sep 30 '22 20:09

Wolph


I'd use Redis. Queue of keys per user + set of blobs retrieved by these keys.

like image 25
vartec Avatar answered Sep 30 '22 19:09

vartec