Laying down some PHPat beats

If there has been one buzz in the past days, it's been the announcement of Facebook of the Hip Hop for PHP (or HPHP). This new tool for PHP developers (or actually for users of PHP) is aimed at gaining performance by converting PHP code to C++ code, then compiling the C++ code to a binary which includes a web server. But what will it actually mean for PHP?

Over the years there's been a lot of tools to improve the performance of PHP. Sometimes, these were tools specifically aimed at PHP (such as APC or the Zend Optimizer), at other times we've been hooking into existing tools (such as Memcache). But in all these situations, the actual PHP code was left alone and deployed in the traditional way of putting the PHP files on a server that is able to parse the PHP files on each request. There have been other initiatives to compile PHP (such as Roadsend) but for some reason there was no big adoption. I think this might change with HipHop for PHP.

One reason for things like RoadSend not to get a huge adoption figure is obviously because it requires a lot of control over the server you deploy to. And since the majority of PHP users deploy to shared servers with limited control over their server, there is little that can be done to actually use it. Another reason though is because most probably many people did not know about Roadsend and similar initiatives. Even in the larger companies that I've worked for in the past, I've never really encountered it so far, and it wasn't until recently that I bumped into Roadsend.

But with the rise of Virtual Private Servers and the dropping prices of dedicated servers, more and more people are taking control over the environment to which they deploy their PHP applications, whether business or private. And with that, initiatives such as Roadsend and HipHop for PHP get more leverage. And actually they become more useful, because in a VPS, every little bit of resource counts, so when there are tools that can save some resources, people are more inclined to start using it.

Still, HipHop for PHP might not be for everyone. First of all, because not every PHP application will be able to use it (HipHop for PHP can not convert all PHP to C++ code. Things such as eval() won't work). But also, because it won't be necessary for everyone. If you're just running your personal blog, I'm not sure HipHop for PHP will be for you. It might be able to help, but with a regular blog the difference might not be so big, especially given the hassle it will take to use it. Keep in mind that you've have to convert, compile and deploy for every little change to your script.

So where can it be really useful then? I foresee a lot of use for HipHop for PHP in PHP-based backends. PHP applications that have a multi-tiered architecture can benefit from HipHop for PHP. The front-end could be a pure PHP implementation. This makes it easy to change the front-end. The back-end services on the other hand could be HipHop for PHP services that expose data and/or contain the business logic. This is the part of the application that doesn't change as much as the front-end, so the overhead of converting and compiling is more worth it. And this is also the place where big performance hits are usually taken, making it even more interesting to speed up that part of an application. 

It might even be that, with the above in mind, more people will go for a more service oriented approach to their application, finding out performance bottlenecks in their application, converting them to isolated components and turning those into HipHop services. 

And this is where I hope HipHop for PHP will help PHP development in general, even for those that will not actually use it: It might make people give more thought on architecture, on nice and isolated components that can be easily replaced or refactored without having to change the whole application. Even when people end up not using HipHop for PHP, the fact that it is available and people know about it may make people consider their application architecture.

Now it's just waiting for the sources to become available, so that everyone can start playing with it. 

Add comment

Comments

gravatar Joshua Thijssen: Although I support every project that speeds up the execution of PHP, i'm not 100% sure that it will be *THE* magic bullet the php community is waiting on.

The bottleneck in most PHP applications would be I/O and other external factors. For instance: I/O of the webserver sending or receiving http requests, waiting for database or memcache results etc. In general: your systems will be waiting on IO or blocking system calls rather then bottle-necking on the PHP/zend engine to do it's stuff.

However, I really do like to see some benchmarks on the average performance gain.
February 3, 2010
gravatar left: Joshua: I'm not saying it's the magic bullet. Much on the contrary, I do not think this will help the majority of PHP developers. I do think it could be a good step towards better and faster PHP applications by having people consider more factors than the historical factors.
February 3, 2010
gravatar Clarian: I agree with Left. It seems fast and convenient, but it's not the final chapter in the PHP evolution. It only helps a small window of PHP developers and may even throw your average PHP user off balance. I've been using it for awhile and it's definitely an upgrade, but just not a big enough one. I do look forward to what might be next though. Assuming it hasn't already happened...I'm behind the trends sometimes.

-J. Clarian
February 17, 2011
gravatar Orlando Managed services: I use php all the time at work. There is nothing better for building websites. there is nothing better.
November 3, 2011
gravatar Wound Bandages: I really like the work that has gone into making the post. I will be sure to tell my blog buddies about your content keep up the good work. Thanks
February 4, 2012
gravatar Diamond Sofa: I love this post a lot. I'll definitely be back again. Hope that I will be able to study far more informative posts then. Is going to be sharing your wisdom with all of my associates!
February 7, 2012
gravatar ashley furniture: I wanted to thank you for this great read!! I undoubtedly having fun with each little bit of it I've you bookmarked to check out new stuff you post
February 7, 2012
gravatar Robert Michael Furniture : Thanks for your sharing .Your thoughts are creative and they actually do help to me. It provides me with a lot of information. It is a nice post!
February 24, 2012
gravatar offset patio umbrella:
Great blog article about this topic,I have been lately in your blog once or twice now.I just
wanted to say hi and show my thanks for the information provided.
February 24, 2012
gravatar Time Warner Bundles: This is definitely a blog worth following. You’ve got a great deal to say about this subject, and so much knowledge. I think that you know how to make people listen to what you have to say, especially with an issue that’s so important. I am glad to see this blog. Two big thumbs up, man
February 24, 2012
gravatar oakley sunglass sale: oakley sunglass

March 2, 2012
gravatar tilting patio umbrella: I cant believe the amount of fantastic info you have on your weblog. I've learned a lot from it. Will probably be coming back soon...
March 8, 2012
gravatar vinyl siding price: Thanks for the info about the new PHP hiphop development, keen to see how it performs.
March 12, 2012
gravatar love facebook statuses: You’ve got a great deal to say about this subject, and so much knowledge. I think that you know how to make people listen to what you have to say, especially with an issue that’s so important. I am glad to see this blog. Two big thumbs up, man
March 26, 2012
gravatar facebook status: more people will go for a more service oriented approach to their application, finding out performance bottlenecks in their application, converting them to isolated components and turning those into HipHop services.
March 26, 2012
gravatar timeline profile covers: This seems to be a good news. I will use it for my site.
March 29, 2012
gravatar China Wholesale: I wanted to thank you for this great read!! I undoubtedly having fun with each little bit of it I've you bookmarked to check out new stuff you post
April 17, 2012
gravatar Nike Free 3.0 V4: Im quite certain I'll learn a lot of new stuff right here! Best of luck for the next!
May 26, 2012

Php5_zce_logo

Upcoming events

I will be speaking 05-06-2012: Forum PHP
I will be attending 06-06-2012: Symfony Live Paris 2012
I will be attending 07-06-2012: Symfony Live Paris 2012
I will be attending 08-06-2012: Symfony Live Paris 2012
I will be attending 09-06-2012: Symfony Live Paris 2012
I will be attending 23-06-2012: PHP TestFest NL

Tags

1337 2008 2010 2011 4developers access modifiers accessibility AdaLovelaceDay09 advent agavi agile alfred amsterdam apache api apple article articles atk atkMetaNode audioscrobbler autoloading automation azure backwards compatibility barcelona barcodes bash bbc bbq beatstad belgium best practices bittorrent blogging blogs boards of canada book books bughuntday bundle caching cake cal evans calendar career cat cerf certificate cfp cilex clear cms cologne common sense communities community components composer conference conferences contest continuous integration contribute contribution crisis css curl custom d-day datetime DbFinderPlugin decorator decorators deployment deps devdays development directoryindex directoryiterator docblox doctrine documentation download dpc dpc09 dpc10 dpc11 DPC2008 dreamhost drupal dv7 eclipse ed editors efficiency enterprise errors event events expertise ezcomponents facebook filter-branch filteriterator finland flickr fork framework frameworks freelance freeze frontend fun game games geoip germany getting real git github globiterator gnome-do google google calendar googletalk graceful degradation hack hackers hidden gem hiphop howto hp HR html http i386 ibuildings icann ide ideasofmarch idm imovie inclusivity indy ingewikkeld integration international php conference internet interview ipad IPC ipc ipc08 ipc10 ipc11se iterators iterm2 javascript jenkins jenkins-php job job openings jobeet john peel joomla joomladays kiva kubuntu launcher launchy left on the web libcurl libraries library lighttpd lime linktuesday linux live london loudblog m2ts mac magazines malware mambo marjolein mediterra meeting meme meta methodology micro-financing microframework microsoft migration movie music mysql namespace namespaces netbeans netherlands newsfire nllgg northeastphp nos odmarco open source opinion ORM osx paradiso paris partnership pavilion pear pecl performance personal pfc10 pfc11 pfcongres pfcongrez pfz photo php PHP php5.3 phpabstract phpazure phpBB phpbb phpbelgium phpbenelux phpbnl10 phpday phpdoc phpdocumentor phpgg phpitalia phpnw phpnw08 phpnw11 phpstorm phptek phptek09 phpuk2009 phpUnderControl phpunit php|architect php|tek podcast politics portability postcrossing presentation presentations private projects protected prototype PSR-0 public python qa qr codes re2c recruiting refactoring review rewrite ruby on rails san francisco schedule scifi script security sensio seven things sfdaycgn sflive2011 shell scripting silex simplexml slides smfony software sogeti solar sound speakers spl ssh standard standards star trek static steer strings stylesheets subversion symfony symfony live Symfony2 symfonycamp symfonyday symfonylive symfonyUnderControlPlugin talk talks tech techademy technology techportal tek09 telecommuting terratec terrorism testfest testing textmate textpattern the right tool timeout tips tld todo tomas tools training twig uncon unet usability usergroup validation vhost video vim vinyl virus warp webinar weblogging webservices wiki windows winphp women wordpress work workshop world world of warcraft wpi writing wunderlist xml xpath xsd yara year youtube zc11 ZCE zemanta zend zend framework zend server zend studio zendcon Zend_Form zite
© 2004 - 2012 Stefan Koopmanschap + Powered by Symfony, photos powered by Flickr, links powered by Delicious, Shanghai smilies by Iconbuffet. Feeds: rss / atom. Left on the Web v4.4.0.1