Async MySQL Calls in HHVM 3.6

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, February 17, 2015

Follow me on Twitter as @mattiasgeniar

HHVM keeps getting better.

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.

HHVM blog

After their async curl support announcement, it’s time for a really impressive feature: async MySQL calls. Imagine having the ability to fire of multiple queries to multiple SQL servers in parallel.

While it’s not exactly a drop-in replacement for PHP, HHVM can be a real candidate to consider if you’re working on large-scale PHP projects.



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.