<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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.
<div><br class="webkit-block-placeholder"></div><div>At any rate here's the code:</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="http://bugs.joestump.net/code/Net_Gearman/">http://bugs.joestump.net/code/Net_Gearman/</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">And you can install the package by running:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">pear install "<a href="http://bugs.joestump.net/code/Net_Gearman/Net_Gearman-0.0.1.tgz">http://bugs.joestump.net/code/Net_Gearman/Net_Gearman-0.0.1.tgz</a>"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Things that I'm not currently doing very well and would love input (or patches!) on:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">2.) It's not fully unit tested nor documented fully.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">3.) I'm not doing a very good job of checking/validating sockets after they're opened to see if they go away. </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">4.) I don't do retries in Net_Gearman_Task/Set. </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thoughts? Suggestions? Outright flames?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--Joe</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="webkit-block-placeholder"></div>  </div></body></html>