7 ms·
Facebook isn't built with PHP (using hiphop-php) anymore?
by myko 13y ago
Facebook isn't built with PHP (using hiphop-php) anymore?
- noelwelsh 13y agoThe PHP code is the tip of the iceberg. The real work in Facebook is done by the many systems behind it, which are very definitely not written in PHP.
- dubcanada 13y agoFacebook is entirely written in PHP. It uses all sorts of databases and other systems to handle stuff, but so does every other website. It's still written in PHP. Facebook has their own PHP fork, which they use/and modify. I do not believe that Facebook pushes their modifications to PHP as a whole.
- byroot 13y agoAFAIK it's not true. First they don't use raw php: https://github.com/facebook/xhp/wiki https://github.com/facebook/xhp/wiki Then they use it only for the view layer, it only pull some data from memcache to render HTML. But all the hard work is C++ / Java / Tornado / etc
- pavs 13y agoCorrect me if I am wrong, but very few large scale project (if any at all) use raw PHP. Most of them rely on some kind of framework. Besides FB said it themselves that large portion of their code is PHP.
- wpietri 13y agoWell, that would presumably mean that the bulk of their code is view code. Which, by line count, probably makes sense.
- MBCook 13y agoThe front end is PHP, but I thought they used other languages (such as Scala, Erlang, and C++). I found a page from 2010, but I couldn't find a more up-to-date source. http://www.makeuseof.com/tag/facebook-work-nuts-bolts-technology-explained/ http://www.makeuseof.com/tag/facebook-work-nuts-bolts-techno...
- noelwelsh 13y agoThose "databases and other systems" make up a significant portion of their code base, and in many cases Facebook either contributes to their development or created them internally. To claim that Facebook is written entirely in PHP is false. Examples: - Cassandra (Java) was created by Facebook http://en.wikipedia.org/wiki/Apache_Cassandra http://en.wikipedia.org/wiki/Apache_Cassandra - Giraph (Java) has significant contributions from Facebook and I believe was founded there http://giraph.apache.org/ http://giraph.apache.org/ - FP (Erlang IIRC) at Facebook http://cufp.org/videos/functional-programming-facebook http://cufp.org/videos/functional-programming-facebook - Facebook's page listing some of the open source projects they contribute to https://developers.facebook.com/opensource/ https://developers.facebook.com/opensource/
- sovande 13y agoThe last link you posted has this though; "PHP is an incredibly popular scripting language which makes up the majority of our code-base. Its simple syntax lets us move fast and iterate on products." Not sure if I believe it though.
- dubcanada 13y agoAlright, let me correct myself then. The "frontend" of Facebook is written entirely in PHP. The backend is written in everything from Erlang to C++.
- Kiro 13y agoDon't correct yourself. The majority of the backend is written in PHP as well.
- slurry 13y agoHip Hop is giving up on PHP internals while not having to throw out legacy code [immediately anyway]. They might for all I know still use plain PHP for some things but the Hip Hop project is not a vote of confidence.