BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Presentation: Facebook: Science and the Social Graph

Presentation: Facebook: Science and the Social Graph

Bookmarks

In this presentation filmed during QCon SF 2008, Aditya Agarwal discusses Facebook’s architecture, more exactly the software stack used, presenting the advantages and disadvantages of its major components: LAMP (PHP, MySQL), Memcache, Thrift, Scribe.

Watch: Facebook: Science and the Social Graph (1h)

Facebook is using LAMP stack (Linux, Apache, MySQL, PHP) plus Memcache to run their web servers. The scripting language of choice is PHP. Beside those, there are a number of services: AdServer, Search, Network Selector, News Feed, Blogfeeds, CSSParser, Mobile, ShareScraper. The services are built using a common framework made of Thrift and Scribe, plus some tools: SMC, ODS. The resulting numbers are impressive: 120M+ users, 50B+ page views per month, 50K+ applications and 400K+ developers for those applications.

Agarwal explains why they are using MySQL, PHP, Memcache, Thrift, their strengths and their weaknesses. He also shares lessons learned along the way. For example, PHP has an extensive library support for web development and works well for rapid iterations, but it does not scale well for large code bases. The extension framework is so difficult to use that developers usually avoid it. Among the advantages of using MySQL, Agarwal mentions speed and reliability. He said that Facebook hasn’t lost any data yet.

Agarwal also explains the process of servicing a page request, a feed and a search. He also answers many questions from the audience.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Download the presentation

    by Steve Tirtha,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Hi,

    can I download the presentation somewhere?

    Steve

  • Re: Download the presentation

    by Dinh Pham,

    Your message is awaiting moderation. Thank you for participating in the discussion.

  • Re: Download the presentation

    by Dinh Pham,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Or you can install Real Player. It will allow you to download all the slides in a bunch

  • hmm.

    by Ivan L,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    telling me php doesn't scale is like telling me java supports oo programming. five minutes of looking at that language told me that. the db stuff was slightly more interesting - more evidence as to the death of the traditional rdbms but in the end not that surprising. anything of facebooks scale can't support traditional clustering and has to drop to partitioning of some kind.

    their platform sounds like a mess of a variety of languages. "right language for the task" sounds to me like a euphemism for "i can't really control my vastly more experienced developers"

  • Re: hmm.

    by Max Indelicato,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    "their platform sounds like a mess of a variety of languages. "right language for the task" sounds to me like a euphemism for "i can't really control my vastly more experienced developers""

    This sounds to me like the a critique by someone who is afraid to move beyond their comfort zone.

  • Re: hmm.

    by Dan Creswell,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    "their platform sounds like a mess of a variety of languages. "right language for the task" sounds to me like a euphemism for "i can't really control my vastly more experienced developers""

    This sounds to me like the a critique by someone who is afraid to move beyond their comfort zone.


    Dunno about that but would note that Amazon also use a variety of languages and it's encouraged - Vogels says:

    "You build a small team. You give them this problem. And at Amazon, they're allowed to solve that problem in any way they see fit, as long as it is through this hardened API. They can pick the tools they want. They can do any design methodology they want as long as they deliver the actual functionality that they've been tasked with......We have some requirements: that services has to be monitorable, that they have to be tractable in all sorts of different ways. But in essence, operation is all up to the service owners themselves. This allows for a large-let's say controlled chaos-which actually works very well because everybody's responsible for their own services."

  • Re: Download the presentation

    by Brian Wood,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Hi Dinh,

    Your link goes to one particular slide (6.swf). I can get to the others by editing the url, but is the a starting page, or a way to download all of the slides at once?

    Thanks for posting this presentation.

    Brian

  • Nice presentation

    by benny rio,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    seems like implementing SOA at lower level, great idea

  • Back to the future

    by Adrien Delorme,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    "[...]the other reason we use php apart from the fact that we started of on it[...]"

    With this phrase I just would like to ask, what would you use if you could go back to the very beginning of Facebook with the nowadays advances ?

    Java, Php, Ruby, Python etc. ?
    Rails, Zend, Symfony, your framework, reinventing the wheel etc. ?

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT