I would like to create a distributed video encoding unit for several dozen machines. I had never worked with a messaging queue before, but the 2 that I started playing with were Gearman and Beanstalkd.
Beanstalk seems a lot simpler and easier to use than Gearman, but it is not as much as a function.
One thing I donโt understand is ... how do you create new workers on all servers? I plan to use php. Is it as simple as working with work.php in the CLI with "&" and just sitting there waiting for work?
I noticed that the mechanism does not kill the process after completing the task, but Beanstalk does this, so I have to restart the script after every work on each server.
Currently, I am more likely to use Beanstalk, the general flow of things that I planned was:
Run cron on each server that checks for a predetermined number of workers. If this is less than expected, create new workflows. Each process will take approximately 2-30 minutes.
Maybe I have a flaw in my logic here? Let me know what would be the โbestโ or โrightโ way to do this?
user15063
source share