Coming Soon in HHVM

Posted on February 17, 2015 by

The next HHVM release, 3.6, is on the horizon. We expect it to be released at the very end of February or in early March. It’s going to be a big release. Not only will it be our second release with long-term support, but it will contain several exciting new features — and lay the groundwork for continued development later this year.

New features in 3.6:

  • Long-awaited MySQL support for async functions in Hack! Hack’s async functions allow an application to continue executing code while fetching data, which can dramatically reduce the time it spends waiting for IO. We blogged a few weeks ago about async curl support, and with 3.6, MySQL will be usable with Hack’s async functions as well. This support comes from a new MySQL client library from the WebScaleSQL project; this is built-in to HHVM and will work with any recent MySQL server. Full documentation will be ready by the actual 3.6 release, but for early adopters, here is the internal API header.
  • While we’re at it, we added async support for memcache as well. Much of the code for this comes from the mcrouter open-source project, though again it does not require mcrouter and will work with any recent memcache server. Here’s the internal API header while we prepare documentation for this feature too for the 3.6 release.
  • A restructuring of the FastCGI server, which fixed several memory leaks and reliability issues, especially under very high load.
  • A multitude of other crash and memory leak fixes.
  • Native property handlers, an HHVM-internal feature for compatibility with existing PHP code. Previously, some PHP which used edge cases around __set/__get and sub-classing certain internal classes wouldn’t work on HHVM. With the addition of native property handlers in 3.6, it will work without modification.
  • Speaking of compatibility, 3.6 contains many fixes to make HHVM even more compatible with existing PHP code. As always, HHVM strives to maintain full compatibility with PHP. If your existing code doesn’t work on HHVM, please file an issue on GitHub!
  • Improved typechecking support for XHP in Hack.

But what’s coming out soon is only part of the story. The 3.6 release lays the groundwork for even more impressive components, which will let us continue making HHVM a highly performant, feature-rich PHP runtime.

HHVM roadmap for 2015:

  • Integration of LLVM as a further optimization step to make the hottest code run even faster on HHVM.
  • Continued experiments with support for 64-bit ARM platforms to increase deployment options for HHVM.
  • Improvements to the garbage-collection scheme for HHVM. This will start with collecting cyclic references and move into experiments with a full mark-and-sweep garbage collector, built on top of a pluggable GC interface.
  • Other general memory usage improvements, including investigation into several longstanding memory and stability issues.
  • First-class OS X support.
  • Even tighter integration of the Hack typechecker with HHVM, leading to an even easier experience getting started with and using Hack.
  • Full support for all configuration options in INI files (most are already supported), killing the HHVM-specific HDF files.
  • Releasing the 100% Hack XHP 2.0 library.
  • Continued compatibility fixes to make even more existing PHP code work without modification on HHVM.

So 3.6 will be an exciting release, and 2015 is shaping up to be an exciting year! As always, contributions of any kind are extremely welcome — whether they be questions, suggestions, bug reports, or code — and will always be viewed constructively. Check out the links in the sidebar to the right to get involved!

Posted in FYI | Leave a reply

8 Responses to “Coming Soon in HHVM”

  1. Casey says:

    You guys are killing it. Thanks for all your work!

  2. Elliot says:

    These is a really exciting change-set. I’m desperate to get my hands on all of these things already!

  3. Anatoly says:

    Oh, GC of cyclic references! Really looking forward for this!

  4. John says:

    What about other rdbms, like PostgreSQL and/or SQLite? Is support for them considered or the demand is too low?

    • Josh Watzman Josh Watzman says:

      We haven’t had significant demand for them, at least not to the level of MySQL. If you’d like to see it, feel free to file an issue on GitHub. I can’t promise we’ll be able to get to it soon, but it will definitely be good to have a place to track demand. (And if you, or someone else, wants to build support for us, we’d be happy to discuss there about what a good PR would look like! Definitely the way to ensure support gets added soonest.)

  5. Woo! As soon as OSX support hits, I’m jumping on board with this.

  6. Paul M says:

    Awesome news about async for mysql and memcached.

    What about using APC as a key/value store? I’m doing that right now. Can async functionality be extended to that as well?

    Thanks

    • Josh Watzman Josh Watzman says:

      My understanding is that APC is local to the PHP/HHVM process, and never goes off-box, and so should always be very fast to access. If this isn’t always the case, or you have some other use case for async APC, please file an issue on GitHub so we can track demand!

Leave a Reply