|Think about Loose Coupling|
thread/fork boss/worker framework recommendationby learnedbyerror (Beadle)
|on Nov 30, 2011 at 12:55 UTC||Need Help??|
learnedbyerror has asked for the
wisdom of the Perl Monks concerning the following question:
I come to you yet confused again. My learnings teach me that there are always more than one way to do things in perl; however, my walk through search.cpan.org leads me to the conclude that I have found many almost, but not quite, good and reliable choices :)
I am working on an app that make calls to web service apis on various social web sites. Depending upon the results, this could trigger 0 - n additional calls, which could do the same again. At this time, the call depth does not exceed 3.
I have a prototype working using threads that is marginally acceptable in performance.
I am certain that others before me have developed a most streamlined and elegant boss/worker model solution, but I have not been able to find one that works reliably. Now that I have the logic down, I am rexamining my tooling.
I would appreciate any recomendations that you may have on the following:
Goals: reliability, speed
My current target platform is Linux and perl v5.10.1. I can upgrade perl if needed and alternatively can move this to a Windows machine if that were to be advatangeous.
Thanks in advance for your help!
Updated to strikeout comment on performance penalty of threads::shared and threads::queue based upon feedback from BrowserUK