Facebook launches library to ease PHP embedding blues
- 09 October, 2007 08:31
- Comments
Facebook engineers have made it easier for developers to embed PHP by developing a PHPEmbed library..
"The library is just a more accessible and simplified application programming interface (API) built on top of the PHP Server API (SAPI). The library is so useful, we decided to share it with the world," writes Facebook Engineer Andrew 'Boz' Bosworth.
Python vs. PHP: Choosing your next project's language
Bosworth said that the PHP programming language has solidified itself as the language of choice for many top Internet properties, including Facebook, as it is easy to use and integrates well with Apache, Memcache, and MySQL.
"Despite its suitability for web development and scripting, PHP is generally not the best choice for standalone software or servers. C++, on the other hand, is well suited for building both online and offline services," he writes.
"Unfortunately, if the new services operate with data managed by the existing PHP code base it can be dangerous to use a separate data access pattern. If the cache keys or database schema were to change in the PHP code base then the service would be broken (and potentially corrupting data for the PHP code base) until the code was updated and the program recompiled and restarted."
It was in response to this problem that Bosworth and his colleagues decided to embed the PHP Interpreter into C++ binaries.
"This isn't a novel endeavor by any means; Apache uses the PHP Server API (SAPI) to accomplish exactly that. However, when we began attempting integration of our own we found that the SAPI required quite a bit of expertise to manipulate effectively," Bosworth says.
Nominations for the 2012 ARN IT Industry Awards open on Tuesday, June 12.
- Bookmark this page
- Share this article
- Got more on this story? Email ARN
- Follow ARN on twitter
- Aberdeen Group: Building Business Resilience Through Active Archive
- Spectra Logic and Australian National University Success Story - March 2012
- In Search of the Long-Term Archiving Solution —Tape Continues to Be a Major Player
- In Search of the Long-Term Archiving Solution —Tape Delivers Significant TCO Advantage over Disk
- Market Potential-Strategy Guide to the Active Archive Market
-
World’s eyes on Aussie NBN: Conroy
-
iPhone 5 rumour rollup for the week ending May 27
-
PRODUCTS: Aranez announces K-Leather iPad 2 case
-
Italian mathematician prepares to challenge Google
-
Facebook could buy Nokia to build 'FacePhone', expert claims














Comments
Post new comment