I wanted to check this concept and what everyone thinks of it. I want to use Gearman to run a couple tasks in the background (mainly data gathering and processing).
I want to set up Gearman around a PHP Framework (in my case, it is CakePHP2). As far as I understand Gearman, the workers are simply a PHP daemon running a single php script (ie worker.php).
I am trying to figure out how to bring the logic/code that I have already built in the PHP Framework into that single worker script. Or else I find I may have to rebuild a whole lotta stuff like the models.
So my solution is that to keep the worker.php light and instead have the worker script simply initiate REST API calls via CURL. Does ths sound like a good option to go for?