You might be interested in studying the forking process that popfile does with every module that it finds in the modules folder, in order to keep communication between all of them.
Just download the multiplatform distribution. And also the schema found at their wiki help file. The writing is very clear, and it is also very well standarized.
Comment on Re: Communication between seperate scripts