My web app starts a subprocess using Popen. I need to exchange data with this subprocess.
My current solution uses files and works fine but I am asked to explore other solutions.
- Can I handle a socketserver in my subprocess that I could connect to from « outside » ? As far as I have tested, I can't bind to any address other than localhost.
- Does the subprocess run on the same machine as the app that started it and can I use sockets (from localhost to localhost) to communicate between these 2.
- If I use multiprocessing.Process instead of subprocess.Popen, will it be possible to use Queues for communication ?
Thank you.