It really depends on the type of messaging you want and the role of the two processes. If this is the correct client / server, I would probably create SimpleHTTPServer and then use HTTP to exchange data between them. You can also use XMLRPCLib and the client to talk between them. Manually creating a TCP server with your own protocol sounds like a bad idea to me. You can also consider using a message queuing system to communicate between them.
source share