News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mikko Koppanen:
Working on images asynchronously
December 16, 2013 @ 10:45:35

Mikko Koppanen has a new post to his site today about working with images asynchronously - the "offline" processing of things like user uploaded images using a queuing system.

To get my quota on buzzwords for the day we are going to look at using ZeroMQ and Imagick to create a simple asynchronous image processing system. Why asynchronous? First of all, separating the image handling from a interactive PHP scripts allows us to scale the image processing separately from the web heads. [...] Secondly, separating the image processing from a web script can provide more responsive experience to the user. This doesn't necessarily mean faster, but let's say in a multiple image upload scenario this method allows the user to do something else on the site while we process the images in the background.

He also includes a "barebones" example of how the system would work. The first Worker script makes the connection to the queue system and sends the data off for handling. The second script does most of the actual work, pulling in the image and using Imagick to create a thumbnail image. Finally he includes an example of the use of the workers in combination to send the image data for processing.

0 comments voice your opinion now!
image asynchronous processing zeromq thumbnail imagick

Link: http://valokuva.org/working-on-images-asynchronously/

blog comments powered by Disqus

Similar Posts

Kevin Schroeder's Blog: You want to do WHAT with PHP? Chapter 6 & 7

Francois Zaninotto's Blog: Node.js for PHP Programmers #1: Event-Driven Programming... and Pasta

IBM developerWorks: Efficient mathematical processing using Scilab through PHP

Mikko Koppanen's Blog: Choosing watermark color based on the background luminosity

CodeGeekz: Cropping Images in PHP Based on their Entropy


Community Events











Don't see your event here?
Let us know!


project composer unittest facebook symfony2 language framework podcast hack release hhvm performance install component example database security introduction package application

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework