Net_Gearman a PHP client written for PEAR

Joe Stump joe at
Sat Oct 20 00:08:32 UTC 2007

I've been working on Gearman for the upcoming images section here at  
Digg and, since we're a pure PHP shop (we're hiring!), I set off to  
create a PHP client that I plan on submitting to PEAR. It's based on  
the Python library (don't get me started on PHP's lack of a  
extendable socket class). Kudos to whomever wrote the Python library;  
I liked your style.

At any rate here's the code:

And you can install the package by running:
pear install " 

Things that I'm not currently doing very well and would love input  
(or patches!) on:
1.) Does it even work right? I mean, my tests run fine and it appears  
to be running things in parallel, but is it solid?
2.) It's not fully unit tested nor documented fully.
3.) I'm not doing a very good job of checking/validating sockets  
after they're opened to see if they go away.
4.) I don't do retries in Net_Gearman_Task/Set.
5.) I didn't implement the worker hooks that are ran at various  
stages of running a job (the Python library does this). This is a  
great way to implement logging listeners and I hope to implement it  
at some point.

Thoughts? Suggestions? Outright flames?


-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Gearman mailing list