I have a python program which starts up a PHP script using the subprocess.Popen()
function. The PHP script needs to communicate back-and-forth with Python, and I am trying to find an easy but robust way to manage the message sending/receiving.
I have already written a working protocol using basic sockets, but it doesn't feel very robust - I don't have any logic to handle dropped messages, and I don't even fully understand how sockets work which leaves me uncertain about what else could go wrong.
Are there any generic libraries or IPC frameworks which are easier than raw sockets?
- ATM I need something which supports Python and PHP, but in the future I may want to be able to use C, Perl and Ruby also.
- I am looking for something robust, i.e. when the server or client crashes, the other party needs to be able to recover gracefully.