From georg at georg.org Fri Mar 19 23:42:41 2010 From: georg at georg.org (Georg Kuehnberger) Date: Fri, 19 Mar 2010 23:42:41 +0100 Subject: [TYPO3-performance] PHP HipHop - Facebook In-Reply-To: References: Message-ID: Jonas, Jonas D?bi wrote: > Hi Performance masters :-) > How much could PHP HipHop developed by Facebook be of use for TYPO3? Unfortunately, not at all (which is probably true for all de-centrally developed software). This is mainly caused by HipHops PHP- and Hardware-Restrictions, and by TYPO3s php-based modular architecture and distribiuted developement. (However HipHop seems to be a serious choice in case you do centrally develop a closed source and rather monolithic PHP-app.) > Do you see any chance to compile some parts of TYPO3 with it? NO; AFAI understood HipHop requires you to compile the WHOLE application (all classes, all includes ...) not only parts of it. So in order to keep it modular (like FB is doing, too), the interaction between application-modules (think Extensions) has to be kept outside PHP (that is using RPC/REST/JSON/whatever interfaces), as far as I understood. Be aware of the facts (from the top of my head) that FB: a) is using +7 programming-languages, b) has integrated +30 application-modules - across all those languages and different APIs & Dataformats, d) took the decission to rather compile their 300.000 lines of php-code in order to avoid rewriting. c) is run on +30.000 (!)Servers and still faces performance issues, no wonder given that it e) serves 400 billion PHP-based page views per month. In addition: - Compiled coded (as hiphop does) has to be complied for all different CPU-plattforms (which is not the case for interpreted code, like PHP as you know); thus hiphop is only viable in case you DO controll the hardware in runs under (or you'd invest high into cross-plattform compilation and testing; think debian). - HPHPi might however be interesting to testrun a pre-flight-check on a "plain" TYPO3-Core. ----snip---- "HPHPi the xperimental interpreter designed for development. When using HPHPi you don't need to compile your PHP source code before running it") ----snap---- Pitty, pitty it seems for TYPO3, and other PHP based Frameworks like Zend, however I feel it is not. - 99,0% of all PHP-Frameworks are not facing the scaling issues of FB, and - 99,9% of all PHP-Frameworks including TYPO3 would much more benefit from getting rid of the real performance-hogs within their frameworks and their extensions. I know that we will gather much more performance and save much more memory, cpu-time, energy and even the planet, by eliminating those hogs, rather than by compiling them into some other language. Please find a few pointers below, regards georg http://developers.facebook.com/news.php?story=358&blog=1 http://www.datacenterknowledge.com/archives/2009/10/13/facebook-now-has-30000-servers/ http://wiki.github.com/facebook/hiphop-php/using-nginx-as-front-server-to-hiphop