I am running Gearman server along with Gearman Manager, with their PHP interface. the setup is as shown below. The Gearman server could be either on one of the two machines or on a third machine.
For my implemnetation, I need to be able to tell from one worker if another worker on the same machine is busy or free. e.g. I should be able to tell if Worker 2 on machine 1 is free from Worker 1 on machine 1. Can that be done either with the PHP APIs or the telnet interface?
Possible Solution
On the Telnet interface the 'WORKERS' command gives you a list of all the workers attached to the server along with their ips. I believe I can use that to do my task. I found a PHP script to get this information using telnet.