Net_Gearman 0.0.2

dangalist at dangalist at
Fri Oct 26 09:26:21 UTC 2007

I understand, that gearman should merge all jobs with same parameters set as "uniq" to one 
job and run it just once, then return the resutl to all clients back. Then huge task like Sum(array(1,2)) 
with frequency of 1000 requests per scond would run just once per second. I read somewhere that 
gearman will even merge two same requests which will come in delay eg. 2 seconds and return the result, 
like gearman would cache it or something, this is what I dont fully understand yet.


> Od: joe at
> Komu: <dangalist at> <dangalist at>
> Datum: 26.10.2007 04:58
> Pøedmìt: Re: Net_Gearman 0.0.2
>> Great, your patch seems to work for me also, there is just a > warning
now, but thats not big deal
>> Warning: stream_select(): The microseconds parameter must be > greater
than 0. in /home/domains/gw/ >
gearman/Net/Gearman/Connection.php on line 251
>Ah, crap. I'll fix that.
>> Btw. does the "uniq" mode work for you? Everytime I set it, client >
gets timeout, I do it this way
>> $set = new Net_Gearman_Set();
>> foreach ($sums as $s) {
>> $task = new Net_Gearman_Task('Sum', $s);
>> $task->uniq = true;
>> $set->addTask($task);
>> }
>I think I originally misunderstood what uniq is for. I think it's 
supposed to be a unique identifier for that job server (e.g. 
'task-1234'), which will keep that job from being ran more than once at
the same time on that job server. I'll look into this though.
>Anybody want to give some insight as to what uniq is?

More information about the Gearman mailing list