This article is more than 1 year old

Brace yourselves: Facebook plans MORE PHP jiggery pokery

Zuck's world is predominantly mobile, so he's looking there

Facebook isn’t done fiddling with PHP – far from it. Team Zuckerberg are cooking up fresh changes to streamline further this veteran server horse for mobile, set to be released under open source.

It’s the latest chapter in a rebooted community source strategy that’s chalked up Hip Hop, which then evolved to became Hip Hop Virtual Machine (HHVM).

That rebooted plan will also see Facebook release code elsewhere, from the nuts and bolts of web infrastructure to machine learning and artificial intelligence.

You’ll almost be able to build your own, open-source version of Facebook.

I said “almost".

“We won’t open source the Facebook app itself,” Facebook’s head of open source James Pearce told the press this week under questioning from The Register.

“I’m not sure what benefit there’d be: it would slow us down and I don’t know we’d get meaningful contributions.”

What Facebook will open source is stuff from the interface back – down through the spaghetti deep into the social network’s infrastructure.

“All of these projects are not little projects on their own – they are part of a bigger platform with a small ‘p,’ that work together because they work together here,” Pearce said.

“They are part of our product stack, so over time we want to paint this picture that you can piece together all these pieces of the infrastructure and your startup can have an infrastructure not dissimilar to the infrastructure here.”

What’s coming? Facebook plans to tweak and twiddle more code, spinning them out as projects to make its back-end run slicker on mobile devices. “PHP as a language is as flawed as ever and there are still lots of improvements we can make there,” Pearce asserted. “We are far from done.”

The focus has been to make PHP faster, delivering near-metal speeds – HHVM converts PHP to the statistically typed, and faster, C++.

Facebook’s traffic is predominantly mobile, so that’s where Facebook is looking.

Facebook originally looked at PHP – PHP is the “P” in the LAMP (Linux, Apache, MySQL stack) that built it — because the language wasn’t efficient in terms of its hardware demands, or fast and flexible enough with which to program.

The firm estimates without HHVM it would need ten times the numbers of servers, had it stuck to the original Zend PHP runtime. After that it locked down types using Hack and it built static analysis engines to take more of the dog work out of using PHP and, thereby, help make engineers more productive.

Other forthcoming projects on the back end being looked at are on MySQL scaling and networking.

David Mortenson, Facebook’s director of developer infrastructure, also at Facebook’s London HQ this week with Pearce, told The Reg: “We are staring to think what is the next evolution for these systems that is even better suited to mobile development on the back end side. I’d expect we’d also bring that to the community as open source.

“Our Facebook luminaries in New York are open sourcing their work as they go along. You will see a lot more from the AI and machine learning teams,” Pearce said.

The client-side isn’t done: Facebook this week open-sourced Infer, a static analysis tool to identify bugs in mobile code before the code is shipped.

An Android version of Facebook’s React Native Javascript library, open sourced in March, is coming “soon” – it’s already on iOS. Facebook started releasing code under open source in 2008, starting with the NoSQL database Cassandra.

Cassandra has succeeded, submitted to Apache with companies pushing it and customers using it. Facebook has released hundreds of projects to GitHub.

But, Pearce believes Facebook made mistakes in those early days and had to reboot the firm’s approach to releasing code under open source two years back.

The catalyst was the Open Compute Project, for hardware, that’s been relatively well received in the parts that matter – among those hammering out hardware.

Next page: Staying alive

More about

TIP US OFF

Send us news


Other stories you might like