Pair of python processes communication
Question: I need to implement 2 python processes:

  1. a python client process that will connect to a https server on the web
  2. a python server process that will server 1 or 2 clients (UIs) over ssh if client is outside network, or just tcp if client is inside LAN.

Info will flow from 1 to 2 only, then 2 will communicate back/forth with its
clients. 1 will communicate back/forth with https server and pass info to 2. 2
is a sort of slave of 1. 2 can still run if 1 is down but can provide no info
to its clients. 1 can run on its own, but it's important to have the UI look
at what's going in 1 (through 2). if 2 crashes, 1 still runs and that's very
important.

Looking at the std lib, i see a number of modules that can help.

  1. socketserver
  2. multiprocessing
  3. subprocess
  4. ssh (nothing in stdlib)


Answer: You may be best advised to do this using a **Message Queue** \- it will give
you a very

  1. scalable
  2. secure
  3. web interface
  4. SSL supported

I would suggest that you have a look at RabbitMQ - there is a lovely Python
3.x interface with it.

You could of course do this with TCP Sockets also - but why not let the MQ
handle the nasty synchronisation stuff - and you can concentrate on
implementing the business processes.

