Running Multiple Processes

It is clear that I need to run two or even more separate processes for my scheduler implementation. I can either write separate scripts and run them in parallel or write a multithreaded application that spawns several processes. The first approach is easier to implement, because I don't have to deal with process management in my scripts, but it lacks maintainability—I could easily end up running and maintaining lots of scripts.

Another approach is to spawn multiple threads or processes from within my application. This is a bit more complicated, as I have to take care of starting and stopping processes from my application, but it also gives more flexibility and results in better code, because all functions are maintained within the same script and can share common object and class definitions.

Was this article helpful?

0 0

Post a comment