I'm writing a little Tcl/Tk script, that uses a (custom) web-application (written in Python) to retrieve information from some central storage.
Everything works nicely, but only as long as the address of the webserver is known beforehand.
So I thought about adding some kind of service discovery, where my script would discover all running instances of my web-application on the local network, and automatically use them.
My first idea was to use Zeroconf/Bonjour/Avahi, and have my web-application publish a _my-web-service._tcp service with the actual query path (that the tcl client script should use to access the data) encoded in the TXT field:
avahi-publish-service MyService _my-web-service._tcp 8000 path=/data
Unfortunately, I haven't found anything that brings zeroconf-like service-discovery into the Tcl-world.
In particular, I was looking at the DNS entry on the Tcl Wiki but that only gets me as far as mDNS (and i currently have no clue how to proceed from there to zeroconf stack).
I'm not especially bound to Zeroconf/Bonjour/Avahi, but would like to run my script on Linux/Windows/macOS, and keep my build requirements minimal (that is: i would prefer it, if i don't have to compile my own wrapper code to interface with the service-discovery for each platform). Telling the users to install Bonjour or whatnot from 3rd-party sources would be tolerable though.