How facebook processing it's comments, mails and sms
When we Comment on facebook there are series of back ground process such as mailing , smsing to all the subscribers etc. If they are doing all the mailing and smsing,sending notifications etc in a single stretch posting a comment will take so much time. right? So how they are managing this??
For Eg.: when i comment on my friends photo.They will send a notification and mail (if they are subscribed) to all the previous commentators on the same photo and to the owner of the photo. if there is a 50 commentators on the photo they have to send a 50 notifications and mails in that they need to check who all subscribed etc..
if we try to send the 50 notific开发者_JAVA百科ation and mails on submitting the comment.Then it will take too much time to process
How they are achieving this so efficiently.
They are likely posting the message to a queue to be processed quickly but asynchronously so the response can be sent immediately to the user. Then some background process pulls the message from a queue and does all the notification processing.
These may help:
- http://highscalability.com/blog/category/facebook
- http://royal.pingdom.com/2010/06/18/the-software-behind-facebook/
- http://faler.wordpress.com/2009/05/08/best-practices-for-scalable-high-performance-systems/
- http://www.readwriteweb.com/hack/2010/11/facebook-mysql-scale.php
- http://www.readwriteweb.com/archives/update_facebook_rewrites_php_runtime_with_project.php
Facebook documents the Open Source technologies they use. See http://developers.facebook.com/opensource/
精彩评论