HHVM and Hack on Heroku
In a move that surprised most but displeased none, Heroku, the Cloud Application Platform, has added native HHVM support to their cloud.
PHP has long been a viable solution for high traffic production apps, and has had one of the best package managers for a while, not to mention the fact that it’s evolved significantly since the days of “simple hacks for small projects”. The PHP “development model” has been anything but “hackish” in the professional circles for a while now. The unfortunate ignorance of Adam Gross aside, this really is some big news.
HHVM has been making new forays in popular library and framework compatibility, with the latest update to 3.1 adding full support for Assetic, Composer, Laravel, Monolog, Guzzle, React and more. The team is now refocusing their efforts on getting the open GitHub issues out of the way, particularly those that block people’s deployment, in order to reach an adoption rate that exceeds simple test suite coverage. Previously, Facebook hosted a Hack Developer Day to spread awareness and introduce people to Hack as a viable alternative for their current production environments.
Heroku recognized this potential and bravely dove in head first. If you read my stuff here on SitePoint and elsewhere, you know I’m a sucker for high risk high gain adventures and appreciate such efforts when I see them, so in a community which desperately fears Hack for its future due to its association with Facebook, I was relieved to see a company as strong as Heroku take the lead and push it into production for others.
The new runtime can also take advantage of Heroku XL, designed for super-high traffic apps. Easily scalable with XL, HHVM makes PHP the most logical choice for web apps of the modern era.
To get started with creating your first PHP app, see their simple guide.
This HHVM support at Heroku is more than just switching runtime – it brings with itself the support for Hack, the Super-PHP we’ve covered before. This means you can take advantage of it in production mode today – not having to wait for more widespread adoption.
Hack code gets better with every release and every recompilation, so the resources you’ll save on computing bills will be immense.
If you’d like to share your Hack (on Heroku or otherwise) work with us, let us know. In particular, we’re looking for Vagrant bootstraps in Ubuntu 14.04. that can kickstart HHVM development locally and are immediately prepared to deploy to Heroku as well as soon as the Vagrant Up procedure finishes. For more specific boxes and Vagrant configurations, stay tuned – tutorials and downloads are coming soon, along with sample apps.