Open Source

Asynchronous web services with PSGI and IO::Async

Some of our internal web applications are low-traffic enough that a
preforking server can handle them without difficulty. Some others, on
the other hand, can really benefit from a non-blocking implementation,
so that each server process can serve multiple requests “at the same
time”, by working on a request while waiting for other services to
return data for other requests.

Up to now all our non-blocking web services were written for the JVM,
usually with the Akka framework, but I wanted to see how hard would it
be to build something similar in Perl.

Turns out, it’s not very hard at all, if you use the right libraries
and pay attention at a few tricks.

Continue reading