I've been poking around with using OSC (Open Sound Control, but hardly limited to just sound) mixed with some sort of DNS-like or DNS-based registration and discovery.
Devices that can peer can just exchange OSC messages directly. Otherwise they might use some sort of proxying service (to arrange for OSC over TCP).