user1661677
user1661677

Reputation: 1272

How does Gearman communicate with workers?

I'm looking to setup Gearman in a distributed server environment. What protocol/method does it use to send jobs to [ip-address-1] and [ip-address-2] below?

$worker= new GearmanWorker(); 
$worker->addServers("[ip-address-1],[ip-address-2]");

Upvotes: 0

Views: 141

Answers (1)

palik
palik

Reputation: 2863

I don't now how PHP do that, but with regard to gearman protocol the worker have to register itself with CAN_DO or CAN_DO_TIMEOUT command by gearman server. For instance Perl binding provides register_function method. After registration the worker have periodically to send GRAB_JOB request to the servers.

The clients send jobs to the server with one of the SUBMIT_JOB commands.

Upvotes: 1

Related Questions