in reply to Re: Design advice: Classic boss/worker program memory consumption
in thread Design advice: Classic boss/worker program memory consumption
A potential issue with that design is that now you have the issue of multiple read/write access to a single file ... locking, concurrency and all of that. Which could become quite messy.
I know that it is somewhat counter-intuitive to have a parent that does nothing but mind the kids, but I actually find it easier to do it that way because of the issue of separation-of-concerns, or in this case, of one-thing-to-wait-on. The parent owns the kids, minds the kids, wipes their little noses, and that’s it. The kids connect to their service-provider older brother, and send results to their service-consumer older sister. Exactly how you IPC that stuff together is really up to you ... “tim toady.” But, now, each process (including the parent) basically has only one concern, one thing to worry about at any particular time, and a very uncomplicated internal structure. The processing will scale-up or scale-down easily, and be quite reliable.