4 ms·
This is why Facebook spent so much time and energy working on HipHop. I'm sure they have many caching layers as well, but caching only gets you so far -- event
by spudlyo 16y ago
This is why Facebook spent so much time and energy working on HipHop. I'm sure they have many caching layers as well, but caching only gets you so far -- eventually you have to look at your code.
- megaman821 16y agoFacebook is absolute caching nightmare also. However a news site is much easier to deal with.
- VladRussian 16y agointeresting how things come and go and come back. Some years ago it was Yahoo moving their web layer from C++ based templating to something of more higher level, now Facebook [implicitly] moves their layer down to C++ ...
- sophacles 16y agoThis is logically just nonsense. So the php compiles to C++ now? The devs still write in php, they don't move to another language (well they use a somewhat restricted set of php, but a lot of places do that anyway for various reasons). It is as silly as saying anyone programming in a JVM language is just programming in Java, or anyone using a language which compiles to machine code is just using assembler. (implicitly of course!)
- VladRussian 16y ago>anyone using a language which compiles to machine code is just using assembler obviously it depends on the share of time the one spends tweaking generated code and the compiler's codegen.
- kmavm 16y agoHipHop engineer, here. Unless you consider programming in C++ to be [implicitly] programming in machine language, this doesn't make a lot of sense. Our application engineers write real, no-fooling PHP, at exactly the same level of abstraction as they always have. They usually don't bother compiling it either, instead iterating using our interpreter which behaves more like a drop-in replacement for Apache+Zend.
- bmelton 16y agoI've been looking at HipHop lately -- can you give me a general idea of how much you have to work around HipHop for it to still compile? I know that the references I've seen to it have all indicated that it might choke on certain types of code, but I'm curious as to how mindful you have to be?
- kmavm 16y agoIf you stick to the brightly lit parts of the language, things will work. The Facebook codebase was and is enormous, so the vast majority of PHP has to work as advertised. The one big thing that's ruled out is eval, but other wacky PHP tricks ($f(), $C::staticMethod, $obj->$methodName(), foreach order, etc.) work. Outside of eval, you have to go out of your way to break it. That said, it's a young project, and things can be a bit rocky. Including compilation in your deployment process is also a pain; do not kid yourself about that. It's kind of "industrial strength" in general; unless you care about how many PHP requests you can squeeze out of a unit of hardware, HipHop doesn't have much to offer.