Education Station:
Producer-Consumer Programming

By Edward Barnard

Producer-consumer programming is an excellent technique for offloading work from your main application. You can scale resources to meet increased demand. You can smooth out spikes by placing your backlog in a queue. You can set aside long-running tasks such as thumbnail generation. We’ll develop a simple CakePHP application that produces and consumes via a free CloudAMQP (RabbitMQ) account. Although we use CakePHP, the principles are universal to any modern PHP framework.

This article was originally published in the September 2018 issue of php[architect] magazine. To read the complete article please subscribe or purchase the complete issue.

Leave a comment

Use the form below to leave a comment: