High performance REST APIs written in PHP powered by Aerys?

Submitted by dryer on Tue, 11/03/2015 - 18:19
areas logo

Aerys is an interesting project from the Amp project, which provides a non-blocking concurrency framework for PHP applications. Aerys is a non-blocking HTTP application server, websocket and file server. This sounds a lot like Node applications and it is very similar, but obviously not identical. Why even give async PHP a chance, now that JavaScript is everywhere?

PHP is perfectly capable of creating non-blocking and high performing applications. With Aerys written in PHP you may find it a better choice if your applications are also in PHP. Reusing the same language and code can reduce the complexity of your stack and save up on cost. Creating isomorphic applications is not possible in pure PHP, but with HTTP/2 server push the wait for data on the first request is becoming a non-issue.

Aerys comes multiple different event reactor implementations. The one built with native PHP is not necessarily slowest, but for reliability under high loads you can switch to a PHP extension eventloop written in the C language.

Aerys and asyncronous PHP itself are a new phenomena. Learn more: