Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interprocess messaging between two Python programs

We have two Python programs running on two linux servers. Now we want to send messages between these Python programs. The best idea so far is to create a TCP/IP server and client architecture, but this seems like a very complicate way to do it. Is this really best practice for doing such a thing?

like image 621
Rohita Khatiwada Avatar asked Jan 19 '23 16:01

Rohita Khatiwada


1 Answers

I like zeromq for simple messaging, it's really lightweight and fast...very flexible as well. Using AMQP messaging isn't a bad idea either depending on the specifics of your situation, I've found kombu to be a very nice pythonic library for that. You could also use xmlrpclib or setup a simple REST API with bottle or flask. Every option has it's place, so I'd investigate all your options.

like image 125
zeekay Avatar answered Jan 22 '23 06:01

zeekay