I need to upload IPC::PipeWorkers to CPAN. It handles Solution 2 quite efficiently.
One down side is that you can't fork a replacement child when one of your worker children dies. That motivated me to consider exactly your Solution 1. I spent a little time trying to work out the details of that. But I ended up abandoning the idea because of the huge increase in complexity involved.
Worker children disappearing turned out to never be much of a problem in practice. Also, it is wise for long-running daemons to periodically be restarted anyway, which means the rate of child death needs to be pretty high for it to end up mattering much.
- tye
In reply to Re: Design advice: Classic boss/worker program memory consumption (PipeWorkers)
by tye
in thread Design advice: Classic boss/worker program memory consumption
by shadrack
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |