3 ms·
This might be apocryphal, but I heard that Facebook started as a PHP website and ended up having an enormous amount of C code propping it up while still having
by biztos 8y ago
This might be apocryphal, but I heard that Facebook started as a PHP website and ended up having an enormous amount of C code propping it up while still having all the UI logic in PHP for a long time.
OTOH, if this is true, maybe it did scale, in terms of performance at a certain architectural cost, and maybe more importantly in terms of their ability to hire as a very young (in every sense) startup.
- omarchowdhury 8y agoI still see Facebook site URLs with .php extensions, so they definitely didn't just throw away their roots.
- disgruntledphd2 8y agoFacebook just kept building compilers: 2004: PHP is quick, let's use that. 2006/7: PHP is slow, let's build a compiler for it (HipHop) 2010/11: Still slow, let's build a VM and compile to assembly (HHVM) 2012: types are cool, let's build an oCaml parser to pretend they exist in PHP! I kinda view it as Zuckerberg profoundly agreed with the never rewrite code theory.
- Ayesh 8y agoI suppose these .php URLs are there to not break old shared/bookmarked links.
- omarchowdhury 8y agoA simple htaccess rewrite ruling can cover handling that, though.
- elwell 8y agoFacebook still uses PHP heavily. Technically it's a language called "Hack" (PHP augmented with some nice modern features), and runs either on HHVM (JIT: PHP/Hack -> C -> binary) or precompiled to binary.