learnedbyerror has asked for the wisdom of the Perl Monks concerning the following question:
Oh Monks,
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.; however, I know that I am losing performance because of the overhead associated with threads::queue and threads::shared. My current boss worker framework, crafted by myself and evolved over a couple of months of work, depends on these two modules to manage requests pipeline and to temporarily store data containing state information as well as data that will ultimately be written to a database.
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!
lbe
Updated to strikeout comment on performance penalty of threads::shared and threads::queue based upon feedback from BrowserUK
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: thread/fork boss/worker framework recommendation
by BrowserUk (Patriarch) on Nov 30, 2011 at 13:43 UTC | |
by learnedbyerror (Monk) on Dec 01, 2011 at 15:35 UTC | |
by BrowserUk (Patriarch) on Dec 01, 2011 at 16:17 UTC | |
by learnedbyerror (Monk) on Dec 01, 2011 at 17:18 UTC | |
by BrowserUk (Patriarch) on Dec 01, 2011 at 17:50 UTC | |
| |
by Anonymous Monk on Feb 02, 2012 at 05:08 UTC |