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.
How does this compare to nginx i wonder?
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?!
They wrote their own webserver/php-interpretor to increase the performance with "half or [one] percent"? Wow, that's quite daring I'd say. Note I did not RTFA so probably they saw more performance increase or some other use, otherwise it seems like a likely miss-directed investment.
i can hear both sides now:
the php lovers: "look how awesome php is, you can use it for really large scale deployments!"
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!"
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!
If you need more speed than apache, you run thttpd. I'm assuming they didn't test it.
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
*learns PHP as a new hire at Facebook*
"Look, ma, I'm an engineer!"
*writes shitty php code*
"Look, ma, I'm innovating!"
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.
Yeah I think I'm going to go buy stock in companies because they use PHP. Take that! hurrrr
"The main problem is compilation speed. C++ compilers are just plain slow."
You do go to the bathroom or have some coffee or tea once in a while don't you?
===E
You've been forked.
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.
Webservers are mostly IO bound, why do they need to improve cpu usage ?
I heard that PHP is good for Flooz.
There's a difference between beta and production code when it comes to the code that runs Facebook?
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.
I know people will use PHP. I use PHP. Your inability to pay attention does not, however, say anything about how PHP is perceived. And it is true that listening to non-hacks, like people who tend to congregate here, has an influence. So go figure.If you want to play about how how dumb code-monkeys misuse a PHP feature, that's entirely your business. I'm simply pointing out that there are better ways to go about things, and that while it may make sense to still use a legacy platform, things have actually moved on. I'm not begrudging whatever business you have - have fun!
I forget what 8 was for.
For you trying to find a download link; there is nothing available yet. No beta no nothing.
if(mainType == 11) { subType = 9; break; }
[...]
testp.cpp (subtract 3 from mainType since that seemed like a pattern):
Umm... no.
C/C++ coders are like tank commanders. They're not quite in the trenches like the assembly/embedded guys, but they're close enough to the gritty hellish parts of the job, and they've got a lot of firepower at their disposal.
PHP coders are like UCAV pilots. They pack almost as much firepower as the tank commanders but they're sitting in a big comfy chair in an air conditioned room, sometimes drinking a Starbucks with one hand. Sure they're getting the job done but there's nothing hardcore about it.
A Python coder is like an F22 pilot. Mostly removed from the hellishness of the front lines but still in the action, and wielding unholy levels of firepower.
"When information is power, privacy is freedom" - Jah-Wren Ryel
You have just explained half the code snippets on The Daily WTF
As a regular visitor to the site in question, let us both agree you are exaggerating a fair amount.
Reply to That ||
I hear a lot of bashing of PHP recently. It seems someone wants to clear up the market for a commercial product.
Something like - if you need basic functionality buy "Light Edition", if you need uploading files on server buy "Professional Edition", if you want to use FTP functions or RegExp expressions buy "Business Architect Edition" for 3000.
But PHP does it all and more for free. Will they be able to get the genie back into the bottle? We will see.
At least, we know that it all may work in one product by now. I do not trust paid bloggers and podcasters who bash PHP because I've been programming in an environment with the artificial commercial walls and limitations. Thank you. Better to handle some difficult syntax and limitations of open source software like PHP and MySQL than run into artificial barriers of commercial analogs.
I guess that there is an element of the US chauvinism in it (or desire to commercialize this environment), because practically the whole Internet runs on the non-US software, PHP&MySQL. PHP is the Eurasia's baby http://en.wikipedia.org/wiki/PHP . I guess it somehow does not fit the US mythology and legends.
You don't want to know! ...
--- I am known for the ones who want to find me on the net. Is that a privacy risk or a privilege? One might wonder..
To my opinion, know Perl and you'll also know PHP; by watching the small differences. I've had a lesser feel for Javascript after doing extensive Perl works.
I'm coming from a Pascal and ASM background; barely touched C or C++ the last 10 years.
--- I am known for the ones who want to find me on the net. Is that a privacy risk or a privilege? One might wonder..
*points to sig*
Shelltris is my favorite.
Reply to That ||
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
HipHop seems really interesting, we have had to switch to lighttpd and xcache to achieve huge performance benefits for our objectCMS framework which is now faster that wordpress, joomla and drupal. I am wondering how hiphop compares to lighttpd and xCache, does anyone know when hiphop is going to be released to the public.
This isn't news. Lots of highly-loaded websites ALSO do not use Apache. This article should have been titled "Facebook gets with the program and ditches Apache like everyone else with a benchmark tool"
IMO the strongest point PHP has going for it is that the language and libraries are documented in one place and in a reasonably human readable way. I'd say Python has the second most readable docs. Certain parts of Java are pretty well documented but to a newbie the docs alone are overwhelming. Other languages frequently are hard to grasp without taking classes or buying books, libraries are diverse and not documented in the same place/way, and in general are just overwhelming. Point in case. I recently taught myself Objective-C for iPhone programming. It wasn't an especially difficult language being familiar already with C, C++, Java, etc and the libraries are reasonably well documented but it's a whole different world from picking up PHP. The level of effort involved is just a bit more here, a bit more there, until it adds up to being a lot more work. I'd like to see someone try to document C and all the common libraries you would want to be as easy to grok as the PHP docs.
At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.