Facebook's HipHop Also a PHP Webserver
darthcamaro writes "As expected, Facebook today announced a new runtime for PHP, called HipHop. What wasn't expected were a few key revelations disclosed today by Facebook developer David Recordan. As it turns out, Facebook has been running HipHop for months and it now powers 90 percent of their servers — it's not a skunkworks project; it's a Live production technology. It's also not just a runtime, it's also a new webserver. 'In general, Apache is a great Web server, but when we were looking at how we get the next half percent or percent of performance, we didn't need all the features that Apache offers," Recordon said. He added, however, that he hopes an open source project will one day emerge around making HipHop work with Apache Web servers.'"
While theres already several libraries intended for creating windows and interfaces with PHP, and to put them together into an executable file, this might greatly improve that area in PHP too. While being faster as well, being machine code it protects your code too.
Along with making it work with Apache Web servers I hope someone works on this aspect too. PHP is really nice and fast to write. *ducks from the c/c++ coders*
Definitely interesting project.
For all the trouble you're going through to convert PHP into C++ (300,000 lines and 5,000 unit tests), wouldn't programming in C++ in the first place be easier?
And here I never thought that anything could ever take the award for "Most Stupidly Named Software" away from the Ubuntu distros.
Congrats again, HipHop! Can I get a Fist-Bump?!
He said they were struggling just to get half a percent more performance with Apache. That had nothing to do with "HipHop".
In reality their CPU usage dropped average 50%
With HipHop we've reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page.
This explains a lot, a couple - few months ago, I started getting complaints about "potentially virus infected" / "unscanable" zip files when being served content from facebook.com and fbcdn.net etc.
They probably changed at this point how they were sending data out of the web server with zip compression and it all started falling over at this point....
I was wondering what the change was....
Curiosity was framed; ignorance killed the cat. -- Author unknown
Chat routinely freezes up the browser, and people appear offline when they are online.
I frequently get error messages from pages that won't dynamically load (there is something wrong with the server, or such message).
Facebook doesn't need a half percent increase in performance, they need a lot more!
sure, hardwares cheap, but when you have over 30k* servers, a 1% saving on them might be worth their coders time.
* http://www.datacenterknowledge.com/archives/2009/10/13/facebook-now-has-30000-servers/
As a programming language, PHP is simple. Simple to learn, simple to write, simple to read, and simple to debug. We are able to get new engineers ramped up at Facebook a lot faster with PHP than with other languages, which allows us to innovate faster.
hahahahahhahahahhahahahahhahahahahhahahah
the php haters: "look how awful php is, you need to convert everything into c++ before you can use it in really large scale deployments!"
"Look how awful C++ is, you have write bits in assembly to get it to really run."
"Look how awful assembly is, you really optimize when you can write machine opcodes."
And the microcode guys just glare out from their caves with their glowy little eyes in incredulity.
Elsewhere is heard, "You guys still use CPU's? It's the GPU decade, dude."
And somebody down the hall builds an ASIC to solve a specific problem and thinks he's so smart.
But, the analog EE understands his elegant circuit doesn't enable a team of 200 developers to build the top social networking site.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
What with their stupid success and their stock options growing in value. Man, what a bunch of fucking retards.
I scream. You scream. I assume that means we're both acquainted with the problem. We proceed.
They wrote their own webserver/php-interpretor
They didn't write a PHP interpreter. They wrote a PHP-to-C++ translator.
Also, I presume that "one-to-half percent" refers to further optimization opportunities after they've done that.
Yeah I think I'm going to go buy stock in companies because they use PHP. Take that! hurrrr
I'm both sides.
I love PHP when I need to throw something together fast (like today) but don't expect a lot of heavy use. I love PHP when I want to get some handy tools that I can easily hack into doing what I really want. Still, when I have a significant project, and server load starts to matter, I loathe trying to use PHP and would usually rather write it as Perl, sometimes even compiling (gasp) Perl into something about as efficient and a whole lot more reliable than if I tried to write it in C. If I were really serious, I'd write it in C, but a day's work in C is 30 minutes in Perl or 10 in PHP.
Choice of language for me is about return on investment. I'm not a grand programmer, I don't have the luxury of getting comfortable programming, if I'm programming it means that I'm not spending time on the dozens of other issues confronting our IT department. Most of the time if we're doing any sort of serious project, we're buying service from somebody who does it better than I have time to, probably better than I could.
If this HH thing (no, can't stand to type the real name) gets momentum then it could be really good for shops like ours. We could turn the tools we don't have time to do well into things that don't suck so much and the tools that we wouldn't think were worth the hardware into things we can afford to run.
B) Eliminate all the stupid users. This is frowned upon by society.
Please, Slashdot Gods, give me a preference filter to hide all comments which begin with "Meh".
If you mod me down, I shall become more powerful than you could possibly imagine.
We're talking about C++ as a CGI script. Who cares about memory leaks that only last for the duration of an HTTP request, which is a fraction of a second? The real problem with memory leaks is when you have a long-running process like single-process web browsers.
I once had a signature.
It's arguments like these that make me wish for a LLVM/JIT version of D that I could use instead of PHP. And then just compile the thing if I needed soopa-doopa performance.
OR that REBOL had developed into a big open source platform.
*sigh*
The fights between C++/C#/Java/JavaScript fanatics are fights about the different implementations/targets of the same obsolete programming syntax structures, and don't do anyone any good.
"Which is like saying an anus is almost like a vagina..."
I bow down in respect. Somebody mark this post for posterity. It's only Feb 2, but this has to be the Analogy of the Year.
Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.
Since php lives in Apache which is always running it makes sense to cache the compiled byte codes.
I like the approach of this:
https://admin.fedoraproject.org/pkgdb/packages/name/php-eaccelerator?_csrf_token=7bb450c274970e7f6d6ece15a4194c5feb114809