<s>
Gearman	B-Application
is	O
an	O
open-source	B-Application
application	I-Application
framework	O
designed	O
to	O
distribute	O
appropriate	O
computer	O
tasks	O
to	O
multiple	O
computers	O
,	O
so	O
large	O
tasks	O
can	O
be	O
done	O
more	O
quickly	O
.	O
</s>
<s>
In	O
some	O
cases	O
,	O
load	B-Application
balancing	I-Application
rather	O
than	O
raw	O
speed	O
may	O
be	O
the	O
main	O
goal	O
;	O
a	O
Web	O
server	B-Application
,	O
for	O
instance	O
,	O
could	O
use	O
Gearman	B-Application
to	O
send	O
tasks	O
for	O
which	O
it	O
is	O
not	O
optimized	O
to	O
another	O
computer	O
(	O
which	O
may	O
be	O
running	O
on	O
a	O
different	O
architecture	B-General_Concept
,	O
using	O
another	O
operating	B-General_Concept
system	I-General_Concept
,	O
or	O
loaded	O
with	O
a	O
computer	O
language	O
better	O
suited	O
to	O
a	O
particular	O
operation	O
)	O
.	O
</s>
<s>
It	O
was	O
originally	O
written	O
in	O
Perl	B-Language
by	O
Brad	O
Fitzpatrick	O
.	O
</s>
<s>
Brian	O
Aker	O
and	O
Eric	O
Day	O
rewrote	O
the	O
framework	O
in	O
C	B-Language
.	O
</s>
<s>
Gearman	B-Application
assigns	O
each	O
involved	O
computer	O
a	O
role	O
as	O
client	B-Protocol
,	O
job	O
server	B-Application
,	O
or	O
worker	O
.	O
</s>
<s>
Tasks	O
originate	O
on	O
a	O
client	B-Protocol
,	O
are	O
transmitted	O
from	O
the	O
client	B-Protocol
to	O
the	O
job	O
server	B-Application
,	O
and	O
performed	O
on	O
one	O
or	O
more	O
workers	O
.	O
</s>
<s>
The	O
completed	O
task	O
's	O
output	O
is	O
then	O
returned	O
,	O
again	O
by	O
way	O
of	O
the	O
job	O
server	B-Application
,	O
to	O
the	O
client	B-Protocol
where	O
the	O
task	O
originated	O
.	O
</s>
<s>
Gearman	B-Application
is	O
conceptually	O
related	O
to	O
MapReduce	B-Operating_System
;	O
Gearman	B-Application
handles	O
MapReduce	B-Operating_System
by	O
allowing	O
worker	O
nodes	O
to	O
map	O
out	O
work	O
to	O
other	O
workers	O
,	O
with	O
the	O
original	O
worker	O
acting	O
as	O
the	O
reducer	O
.	O
</s>
<s>
Gearman	B-Application
performs	O
coalescence	O
on	O
the	O
work	O
sent	O
by	O
a	O
client	B-Protocol
.	O
</s>
<s>
If	O
two	O
or	O
more	O
clients	O
ask	O
for	O
work	O
to	O
be	O
completed	O
on	O
the	O
same	O
body	O
of	O
work	O
,	O
either	O
by	O
seeing	O
that	O
the	O
same	O
blocks	O
are	O
being	O
sent	O
or	O
by	O
using	O
the	O
unique	O
value	O
sent	O
by	O
the	O
client	B-Protocol
,	O
it	O
will	O
coalesce	O
the	O
work	O
so	O
that	O
only	O
one	O
worker	O
is	O
used	O
.	O
</s>
<s>
It	O
does	O
this	O
specifically	O
to	O
avoid	O
thundering	B-Operating_System
herd	I-Operating_System
problems	I-Operating_System
which	O
are	O
common	O
to	O
cache	O
hit	O
failures	O
.	O
</s>
<s>
To	O
mitigate	O
the	O
damage	O
that	O
would	O
be	O
done	O
if	O
a	O
job	O
server	B-Application
(	O
or	O
its	O
network	O
connection	O
)	O
were	O
to	O
fail	O
,	O
clients	O
can	O
be	O
configured	O
with	O
more	O
than	O
one	O
assigned	O
job	O
server	B-Application
;	O
if	O
the	O
first	O
assigned	O
job	O
server	B-Application
fails	O
,	O
another	O
can	O
be	O
transparently	O
substituted	O
.	O
</s>
<s>
Gearman	B-Application
implements	O
a	O
protocol	O
that	O
consists	O
of	O
binary	O
packets	O
containing	O
requests	O
and	O
responses	O
;	O
this	O
protocol	O
defines	O
the	O
structure	O
of	O
messages	O
passing	O
between	O
the	O
three	O
parts	O
of	O
a	O
Gearman	B-Application
implementation	O
.	O
</s>
<s>
By	O
default	O
,	O
the	O
Gearman	B-Application
protocol	O
uses	O
TCP	B-Protocol
port	O
4730	O
.	O
</s>
<s>
It	O
previously	O
operated	O
on	O
port	O
7003	O
,	O
but	O
this	O
conflicted	O
with	O
the	O
AFS	B-Application
port	O
range	O
and	O
the	O
new	O
port	O
(	O
4730	O
)	O
was	O
assigned	O
by	O
IANA	O
.	O
</s>
<s>
The	O
name	O
"	O
Gearman	B-Application
"	O
was	O
chosen	O
as	O
an	O
anagram	O
for	O
"	O
Manager	O
"	O
,	O
"	O
since	O
it	O
dispatches	O
jobs	O
to	O
be	O
done	O
,	O
but	O
does	O
not	O
do	O
anything	O
useful	O
itself.	O
"	O
</s>
<s>
Currently	O
there	O
are	O
client	B-Protocol
libraries	O
for	O
C	B-Language
,	O
Perl	B-Language
,	O
Node.js	O
,	O
Python	O
,	O
PHP	O
,	O
Ruby	O
,	O
Java	O
,	O
.NET	O
,	O
JMS	O
,	O
MySQL	B-Application
,	O
PostgreSQL	B-Application
,	O
and	O
Drizzle	B-Application
.	O
</s>
