General developer forum

HipHop virtual machine and Moodle - January 2014

 
 
Dan at desk in Moodle HQ, Perth
HipHop virtual machine and Moodle - January 2014
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

Some of you may have come across the hiphop project before, its the platform Facebook run their php code on and indeed its previously been discussed on this forum.

In case you need a reminder, the project page says:

HHVM (aka the HipHop Virtual Machine) is a new open-source virtual machine designed for executing programs written in PHP. HHVM uses a just-in-time compilation approach to achieve superior performance while maintaining the flexibility that PHP developers are accustomed to. To date, HHVM (and its predecessor HPHPc before it) has realized over a 9x increase in web request throughput and over a 5x reduction in memory consumption for Facebook compared with the Zend PHP 5.2 engine + APC.

It seems that over time this project has come on a lot, their blog post "Wow HHVM is fast…too bad it doesn’t run my code" really sets the scene quite well.

In fact, having looked a the list of supported extensions I was shocked, it looks quite conceivable that you could have a working version of Moodle using hiphop in the near future.

So I spent a bit of time doing a small investigation on this, seeing how far I could get. Sadly they bundle the mysql rather than mysqli extension which we require, so I had a go using the third-party PostgreSQL extension. Sadly, I did not get very far (installation issues with inserts) but i've put my hacky patch on MDL-43724.

Anyway the main point of this post was to encourage anyone else who is interested in researching this area. I think there is a lot of good work which could come out of further work on this. With our coverage in unit tests and behat acceptance tests - its actually relatively simple to get a good feel for how much compatibility we could provide. At the very least, we could be filing bugs with hiphop about outstanding issues which block us from using it.

Of course its quite possible (and to be honest, knowing Moodle as I do - potentially very likely) that Moodle will always need something more than hiphop can provide - but its an interesting area to look at. Get involved on MDL-43724 if this interests you. smile

 
Average of ratings:Useful (3)
Picture of Christopher Svanefalk
Re: HipHop virtual machine and Moodle - January 2014
 

The HHVM team has announced that they will be supporting mysqli as of version 2.5.0, which is just 2 months away smile

http://www.hhvm.com/blog/3287/hhvm-2-4-0#comment-16991

 
Average of ratings:Useful (1)