radarsat1 / liblo

liblo is an implementation of the Open Sound Control protocol for POSIX systems
GNU Lesser General Public License v2.1
188 stars 59 forks source link

zeroconf/avahi support #78

Open radarsat1 opened 5 years ago

radarsat1 commented 5 years ago

It should be a configuration option to allow discoverability over the zeroconf protocol as outlined in OSC 1.1 spec.

7890 commented 5 years ago

A short notice, for proprietary discovery it's possible to use UDP broadcast on a (shared) port. Sending in LAN to 255.255.255.255:1234 /hello/im/here/query/my/stuff However this involves pre-agreed discovery port for announcements (and eventually as a query "channel") syntax and semantics for participants in such network. It could be done all with existing OSC infrastructure.

showlabor commented 5 years ago

I don't necessarily think zeroconf (mDNS/DNS-SD) should be part of liblo. There already are libraries or APIs for system services for every platform to handle it. So we can just leave the discovery and announcement jobs to them. For the proprietary discovery scheme 7890 mentioned: Behringer/Midas use it for example on their X32/M32 and XAir/MAir line of mixers. It's OK there because they do control the hardware and firmware on those mixers and thus can guarantee that the necessary port is available. On a general purpose computer this guarantee can usually not be given.

radarsat1 commented 5 years ago

To be clear this idea just comes from having a recent look at the 1.1 spec, where I'd forgotten until now that this was "officially" proposed. I recall something about avahi and liblo from many years ago but I don't remember in one context, and I guess that code did not survive.

@7890 we do something similar on libmapper but using multicast. It works great actually.

@showlabor could be, i put this here for discussion. i haven't looked into how easy it is, at least i would keep it optionally compiled if anything. certainly not every OSC service wants to announce itself this way.

I'll put this on the shelf for now but leave it open for a while in case there are any more comments from the community..