Etsy borrows some HipHop help from Facebook

After borrowing Facebook open source code for running PHP programs more efficiently, Etsy won't need to grow its data center footprint this year, saving it from a significant expense.

By using Facebook's HHVM (HipHop Virtual Machine) software, Etsy doubled the work of each server, eliminating the need to purchase new servers this year, according to Dan Miller, an Etsy software engineer.

That also means Etsy can hold off on procuring extra data center space, which is even more costly than new servers, said Miller, who described Etsy's use of HHVM in greater detail in a blog post Monday.

With a user base of nearly 20 million, Etsy is a Web site devoted to selling craft items on behalf of more than a million merchants.

The site itself was built with PHP, a popular but somewhat chaotic Web programming language. As the company moved into the mobile space, it found its PHP-based codebase wasn't as well suited for serving mobile clients in addition to Web clients.

Miller led an effort to test Facebook's HHVM as an alternative to running PHP directly on its servers. Facebook created HHVM to speed up the execution of PHP code, which it needed to scale to serve its 1.4 billion users.

Using HHVM is superior to executing PHP natively in a number of ways, Miller said. HHVM recognizes when PHP code is being reused and can convert it into machine code to execute more quickly. "Now you can do the same thing with fewer CPU instructions than before," Miller said. The Facebook team also optimized the way PHP handled common functions, such as the handling of arrays.

In initial tests, Etsy had found that most of its existing PHP code could run on HHVM without modification. In fact, it found HHVM could run the PHP code twice as quickly. It quickly rolled out HHVM and now uses the software to run nearly all its user-facing services.

The only limitation that Etsy found is that some extensions to HHVM, such as those for interacting with databases or to serve as a caching layer, may not be as robust as HHVM itself. Many were written by Facebook engineers to add on to HHVM once it went open source. They weren't used in production by Facebook though, so they haven't been battle-hardened, Miller said.

Companies as large as Facebook find it necessary to build infrastructure software such as HHVM because they can't rely on "mainstream tools" to serve their massive client base, wrote IDC software development analyst Al Hilwa, in a new report on Facebook.

Releasing the software it developed in-house can help a company recruit top programming talent, as well as provide a way for the company's coders to show off their work, Hilwa noted.

The making of an MSSP: a blueprint for growth in NZ

Partners are actively building out security practices and services to match, yet remain challenged by a lack of guidance in the market. This exclusive Reseller News Roundtable - in association with Sophos - assessed the making of an MSSP, outlining the blueprint for growth and how partners can differentiate in New Zealand.

Reseller News Platinum Club celebrates leading partners in 2018

The leading players of the New Zealand channel came together to celebrate a year of achievement at the inaugural Reseller News Platinum Club lunch in Auckland. Following the Reseller News Innovation Awards, Platinum Club provides a platform to showcase the top performing partners and start-ups of the past 12 months, with more than ​​50 organisations in the spotlight.​​​

Copyright 2019 IDG Communications. ABN 14 001 592 650. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of IDG Communications is prohibited.