HHVM and MongoDB
At the start of 2015 we began work on an HHVM driver for MongoDB, as part of our project to renew our PHP driver. Back then, HHVM was in its ascendancy and outperforming PHP 5.6 two to one. With such a huge performance difference it was reasonable to assume that many users would be switching over.
Around the start of 2016 I wrote a series of blog posts when we released the brand new drivers for PHP and HHVM. However, by then, PHP 7.0 had been released. PHP 7's performance is on par with HHVM making it less useful for users to move from PHP to HHVM. HHVM still offers a more strongly typed PHP syntax through Hack, and some other features, but its main attraction, speed, was mostly gone.
Writing an extension for HHVM is very different than doing so for PHP. PHP extensions, of which there are plenty, are written in C. HHVM extensions are written in C++, with very few third party extensions existing. At the same time, although PHP's APIs are not particularly well documented, there is a large group of people to ask for help. PHP also has a clearly defined internal API which is stable across minor versions. HHVM does not have this, and APIs kept changing often, although it wasn't always clear whether we were using an internal API.
Writing an HHVM extension is a very different experience for extension developers compared to PHP extensions. There is even less documentation, and virtually no third party extensions to look at for "inspiration". At the same time, it was much harder to get help from the developers, and much harder to debug as HHVM is many times more complex than PHP.
With PHP 7 released, we saw very little use of the HHVM driver for MongoDB. Some months ago I did a twitter poll, where very few people were indicating that they were using HHVM—and even if they were, they would likely not choose to switch to HHVM given the current climate.
Some of the feedback on the poll was not very assuring either:
With few users, frequent API breaks, and curious bugs we came to the conclusion that supporting the HHVM driver for MongoDB no longer makes good use of our engineering time. With Doctrine and Symfony 4 also no longer supporting HHVM, we have decided to discontinue the MongoDB driver for HHVM.
If anyone is interested in assuming ownership of the HHVM driver, please drop me a line and we can discuss the process in more detail.
Life Line
I walked 2.8km in 18m39s
I've just finished reading The Things We Make by Bill Hammack.
A curious introduction into the world of the engineering method. How it's different from pure science and with the end product of serving mankind in mind.
Updated a restaurant
Updated 2 restaurants; Confirmed a bakery shop
I walked 4.1km in 48m53s
Updated a restaurant
Updated a bar
I walked 8.9km in 4h29m34s
Updated a restaurant
The holiday took a different turn, and view, after last night's sprinkle of tear gas in Nice's air.
Updated a restaurant; Confirmed a toilet
Updated a hotel and a bar
I walked 5.2km in 57m08s
Updated a bar
Updated a restaurant, a museum, and a ticket shop
Updated a cafe
I walked 6.2km in 3h33m10s
An evening out in Nice turned out a little bit more exciting than planned, with a little spot of rioting and bottles thrown at police. Sidestreets FTW.
Updated a restaurant; Confirmed a restaurant
Created a hairdresser shop and a bag shop; Updated a restaurant
Confirmed 2 convenience shops, a gift shop, and a photo shop
Updated a bar
Created a gift shop; Updated a restaurant
Created a clinic
Updated a cafe



Shortlink
This article has a short URL available: https://drck.me/hhvm-mongo-da6