Facebook的架构 [英] Facebook Architecture

查看:204
本文介绍了Facebook的架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在四处搜寻的文章/信息;他们的方式解决这些问题。他们使用&放大器;他们为什么使用。他们如何规模及功放;什么是他们做了什么等主要支柱是学习设计决策。知道哪些处理如此大规模流量的网站给出了很多的三分球为建筑师等要记住某些东西,同时设计新的网站。我分享我发现了什么。

I have been scrounging for articles/info about the architecture at Facebook, the challenges & ways they tackle them. What they use & why they use. How do they scale & what are the design decisions for what they do etc. Main underpinning being to learn. Knowing about sites which handles such massive traffic gives lots of pointers for architects etc. to keep in mind certain stuff while designing new sites. I am sharing what I found.


  1. Facebook的科学与社交图(视频)

  2. 在规模实

  3. Facebook的聊天建筑

  4. Facebook博客

  5. Facebook的Cassandra的架构与设计

  6. Facebook的工程注释

  7. Quora的 - Facebook的架构

  8. 对于Facebook的用户600M

  9. 的Hadoop&安培;它的使用在Facebook的

  10. 二郎在Facebook的:聊天架构

  11. Facebook的性能缓存

  12. Facebook连接架构

  1. Facebook Science & Social Graph (Video)
  2. Scale at Facebook
  3. Facebook Chat Architecture
  4. Facebook Blog
  5. Facebook Cassandra Architecture and Design
  6. Facebook Engineering Notes
  7. Quora - Facebook Architecture
  8. Facebook for 600M users
  9. Hadoop & its usage at Facebook
  10. Erlang at Facebook: Chat Architecture
  11. Facebook Performance Caching
  12. Facebook Connect Architecture

我有2个链接,但无法发布,由于在这个网站的限制。另外,请分享,如果任何人有任何更好的(不需要涉及到的Facebook只)。

I have 2 more links but unable to post due to restrictions at this site. Also, please share if anyone has anything better (need not be related to Facebook only).

P.S。 - 我没能找到好地方分享这项研究,因此,这一倡议。希望这可以帮助别人。

P.S. - I wasn't able to find good places to share this research, hence this initiative. Hope this helps someone.

推荐答案

那么Facebook已经发生了许多许多变化,这不是最初设计是有效的。它的目的是做的工作。我绝对不知道的code是什么样子,你可能不会发现它很多信息(为明显的安全和版权的原因),但只是看看的API。看看它改变了多久和多少的不正确,了,或者在所有工作。

Well Facebook has undergone MANY many changes and it wasn't originally designed to be efficient. It was designed to do it's job. I have absolutely no idea what the code looks like and you probably won't find much info about it (for obvious security and copyright reasons), but just take a look at the API. Look at how often it changes and how much of it doesn't work properly, anymore, or at all.

我觉得最大的王牌他们的袖子是街舞。
http://developers.facebook.com/blog/post/358
您可以使用自己的HipHop:
http://wiki.github.com/facebook/hiphop-php

I think the biggest ace up their sleeve is the Hiphop. http://developers.facebook.com/blog/post/358 You can use HipHop yourself: http://wiki.github.com/facebook/hiphop-php

但如果你问我,这是一个非常宏大的,可能浪费时间的任务。街舞只支持这么多,不能简单地转换一切到C ++。那么,这告诉我们什么?那么,它告诉我们,Facebook的不完全走的是PHP语言的优势。它没有使用最新的5.3,我敢打赌还是有很多是PHP 4兼容。否则,他们无法用街舞。街舞是一个好主意,需要成长和扩张,但在它的当前状态,它不适合,很多人谁是建设新的PHP应用程序非常有用的。

But if you ask me it's a very ambitious and probably time wasting task. Hiphop only supports so much, it can't simply convert everything to C++. So what does this tell us? Well, it tells us that Facebook is NOT fully taking advantage of the PHP language. It's not using the latest 5.3 and I'm willing to bet there's still a lot that is PHP 4 compatible. Otherwise, they couldn't use HipHop. HipHop IS A GOOD IDEA and needs to grow and expand, but in it's current state it's not really useful for that many people who are building NEW PHP apps.

有也通过类似的事情树脂/栎PHP来JAVA。再次,它不支持一切...

There's also PHP to JAVA via things like Resin/Quercus. Again, it doesn't support everything...

另外要注意的是,如果你使用任何非标准的PHP模块,你是不是要能够到code转换为C ++或Java无论是。然而...让我们来看看PHP模块。它们被编译在C ++中。所以,如果你可以构建PHP模块做的事情(如解析XML等),那么你基本上(减去一些互动)以相同的速度运行。当然,你不能只让每一个可能需要的PHP模块和你的整个应用程序,因为你将不得不重新编译,这将是code等困难得多。

Another thing to note is that if you use any non-standard PHP module, you aren't going to be able to convert that code to C++ or Java either. However...Let's take a look at PHP modules. They are ARE compiled in C++. So if you can build PHP modules that do things (like parse XML, etc.) then you are basically (minus some interaction) working at the same speed. Of course you can't just make a PHP module for every possible need and your entire app because you would have to recompile and it would be much more difficult to code, etc.

不过......还有一些方便的PHP模块,可与速度的担忧有所帮助。
虽然在一天结束的时候,我们被称为云,并用它这真棒的事情,我们可以扩展我们的应用程序(包括PHP),所以它并不重要一样多了。硬件越来越便宜。亚马逊只是降低它的价格(再次)的演讲。

However...There are some handy PHP modules that can help with speed concerns. Though at the end of the day, we have this awesome thing known as "the cloud" and with it, we can scale our applications (PHP included) so it doesn't matter as much anymore. Hardware is becoming cheaper and cheaper. Amazon just lowered it's prices (again) speaking of.

所以,只要你code周围的想法你的PHP应用程序,它需要一天的规模......然后,我觉得你很好,我真的不知道我甚至想看看Facebook的和他们做了什么,因为当他们做到了,这是一个完全不同的世界,现在正试图撑起基础设施和维护......嗯,你得到的东西喜欢街舞。

So as long as you code your PHP app around the idea that it will need to one day scale...Then I think you're fine and I'm not really sure I'd even look at Facebook and what they did because when they did it, it was a completely different world and now trying to hold up that infrastructure and maintain it...Well, you get things like HipHop.

现在怎么街舞会帮助你?它不会。这不可能。你开始的新鲜,你可以使用PHP 5.3。我强烈建议寻找到PHP 5.3的框架,所有的新的优点,PHP 5.3带来的表的SPL库一起,也想想你的数据库了。你最有可能提供了从数据库中的内容,因此,请检查的MongoDB和其他类型的是无模式的,面向文档的数据库。他们是非常非常更快,更好地为最普通类型的网站/应用程序。

Now how is HipHop going to help you? It won't. It can't. You're starting fresh, you can use PHP 5.3. I'd highly recommend looking into PHP 5.3 frameworks and all the new benefits that PHP 5.3 brings to the table along with the SPL libraries and also think about your database too. You're most likely serving up content from a database, so check out MongoDB and other types of databases that are schema-less and document-oriented. They are much much faster and better for the most "common" type of web site/app.

看像Foursquare和SmugMug的,并且正在利用新技术,以及它们是如何使用它的一些其他公司的新公司。对于那样成功Facebook是,老实说,我看都不看他们如何建立一个高效的Web网站/应用。我不是说他们没有很(非常)有才华的人在那里工作的创造性地解决(他们的)问题...我也并不是说Facebook是不是一般一个伟大的想法,这不是成功的,你不应该得到它的想法....我只是说,如果你能查看他们的整个源$ C ​​$ C,你可能不会从中受益。

Look at NEW companies like Foursquare and Smugmug and some other companies that are utilizing NEW technology and HOW they are using it. For as successful as Facebook is, I honestly would not look at them for "how" to build an efficient web site/app. I'm not saying they don't have very (very) talented people that work there that are solving (their) problems creatively...I'm also not saying that Facebook isn't a great idea in general and that it's not successful and that you shouldn't get ideas from it....I'm just saying that if you could view their entire source code, you probably wouldn't benefit from it.

这篇关于Facebook的架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆