ming.kernel
ming.kernel

Reputation: 3665

How to distribute several python process in a distributed environment

I have serval python processes talk to each other via socket; each process has a specific role or function.

These processes are initially running on a wire LAN (and the ip of the machines are static ), so I assign an ip address and port number for each one of them to let them find each other and talk to each other; but when I switch a dynamic environment where the ip address of each python process is not static, it's tedious to configure the ip address of the process each time. Currently, I use SSH to login and start different processes, and there are two machines with many different processes.

How can I easily deploy these process in a distributed environment, say in a wireless LAN or across the entire Internet so that they can find each other by themselves; and I will use twitter's murder to distribute my code on these machines.

I guess there should be something like a name service, but I am not sure what I should do.

Upvotes: 2

Views: 161

Answers (1)

Christian Thieme
Christian Thieme

Reputation: 1124

you could

  • use dns instead of ip addresses
  • create your own name service (perhaps a rest service providing a register and a lookup function)
  • use a zeroconf implementation like bonjour or avahi (depending on your os)

Upvotes: 1

Related Questions