We are working on an image-processing application. It involves applying filters, Gaussian etc. We want to make it a highly concurrent application. This will be on multiple single core ec2 instances.
Since Imageprocessing is an cpu intensive operation, we are thinking node.js gets blocked in event loop, so thinking to use php. We are not able to find any benchmarks in this area. Any inputs on this will be a great help.
PHP is not highly concurrent and each request will block until it's done. Node would be fine as long as it's mainly doing I/O, or waiting for another process to return, e.g. calling convert
(ImageMagick), rather than doing any processing itself. The more CPU cores you have to run the actual conversion on, the better.
Its a CPU-bound task. Really well optimized PHP or Node will probably perform similarly. I/O concurrency will not affect CPU bound tasks on single core. On many core the I/O may come into play, but realistically most platforms including PHP have efficient strategies for concurrent I/O now. Also you are likely to end up calling out to C or C++ code regardless.
If you really want (cost-effective) performance, drop the single core thing, put some large basically gaming or bitcoin mining PCs in the office, find a nice way to distribute the tasks among the machine(s) and a way to process multiple images concurrently on the GPUs. None of that is in actuality tied to a particular programming language.
For image processing, I recommend to use PHP instead of Node.js because there are many great PHP packages that can help you work with images easily. Don't worry about the performance of PHP7 or HHVM :)