Networked Broadcast Messaging

gregarican greg.kujawa at
Tue Aug 11 20:34:54 CEST 2009

On Aug 11, 2:14 pm, "squishywaf... at"
<squishywaf... at> wrote:
> I'm not exactly sure what the term for this would be, but I was
> wondering if there were any Python packages that supported some kind
> of ad-hoc message broadcasting. What I'd like to do is something like
> this:
> * On a number of workhorse machines, a process listens for network
> messages from our broadcast service. It subscribes to a certain sub-
> set of them and will only respond to the messaging events that it is
> subscribed to.
> * Any machine can broadcast a message out to the network of machines
> without specifying an IP address.
> * Machines can come and go. Since messages are not directly sent to a
> specific IP address from our Python script, the messages are simply
> broadcasted to those who are there to listen. If nobody is subscribed
> to the message type being sent, nothing happens.
> I know XML-RPC and other friends are an option, but I'm looking for
> something that doesn't require managing a set of IP addresses or
> hostnames. I'm not sure what to Google for such a package/module, any
> direction would be greatly appreciated.

Offhand I'd suggest binding a specific UDP port on the listening
workstations. Then the broadcasting workstation(s) could just pull a
standard list of IP's based on its own subnet. Then there'd be no hard-
coded machine names or IP addresses to manage. Just send the message
to all hosts on the same subnet as the broadcaster(s). Plus the UDP
connection would be stateless and not care if the receivers actually
got the message or not...

More information about the Python-list mailing list