nettings / medianet

A distribution overlay for Raspbian and similar systems to create a JACK-based embedded system for audio processing and streaming. Contract work for [mn] medianet. https://www.medianet-home.de
Other
11 stars 2 forks source link

Enable host name lookup in network-related mn_* services #128

Open nettings opened 9 months ago

nettings commented 9 months ago

Currently, we use multicast groups for convenience and ease of setup even when not strictly necessary. With uncompressed video streaming, the network load penalty has become too high, so we need to make unicast just as straightforward.

It is already possible to use unicast IPv4 addresses in network services in config.json. But: We don't want to assume fixed and known IP addresses. Instead, we want to give our medianet nodes functional host names and use those.

So we need a way to reliably look up names. Currently, several things can go and are going wrong when using hostnames naively:

So it's time to write a library function that can be re-used by all network-related services, and place it neatly in /medianet/overlay/usr/local/lib/systemd/scripts.

On a UDP sender, we need to do the following:

On a UDP receiver: