-1

I am trying to build a commenting system for my site, commenting system is much similar to what we see on facebook, I am trying to figure out how facebook stores and retrieves comments so fast, anyone have any idea which technique they are using, views, stored procedures or something I am not aware of??

Thanks

1
  • 1
    Enormous amounts of money and the infrastructure thusly acquired.
    – arkigos
    Jul 10, 2011 at 6:28

4 Answers 4

2

They have completely customized their data structure...

Found these links from another user on here...

Here is what they said:

Facebook doesn't use an RDBMS for their data management.

They use a non-relational technology called Map/Reduce, included in the Hadoop project. They built a project called Hive to query the data with an SQL-like language. They also built Cassandra, another high-scale, non-relational data management technology.

http://20bits.com/articles/data-management-facebook-style/

http://www.facebook.com/note.php?note_id=89508453919

1

They do a lot of things! But if you have a small site, there are some things they do and may help you.

  1. use javascript to put the comment right after pressing enter, like FaceBook. This comment is not registered, but have a good sense for user.
  2. Have a sign which shows the comment is registered. FaceBook uses like link for comment and when it appears, it means that the comment is registered.
  3. After pressing enter, by means of an AJAX request, send the comment and put as few as possible things in response, for example just an "ok", and after receiving response, show the registration flag I mentioned in previous part.
0

i am guessing they are storing things in a database. also, they use caching to retrieve faster results.

1
  • @afuzzyllama: Dude. the question is already closed.
    – Programmer
    Nov 14, 2012 at 9:20
0

17% accept rate? you should improve that in order to get people helping you anymore. Anyways, because I am such a good guy, I am giving you the answer to help you with your question - read:

Facebook's New Real-Time Messaging System: HBase To Store 135+ Billion Messages A Month And The Underlying Technology of Messages

Not the answer you're looking for? Browse other questions tagged or ask your own question.