Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement peer discovery #58

Open
EvanHahn opened this issue Dec 12, 2024 · 0 comments
Open

Implement peer discovery #58

EvanHahn opened this issue Dec 12, 2024 · 0 comments

Comments

@EvanHahn
Copy link

Prerequisite for #51.

There is no easy answer for how to do this.

Ideally, we would use the native mDNS service on the machine, since RFC 6762 says:

It is possible to have more than one Multicast DNS responder and/or querier implementation coexist on the same machine, but there are some known issues.

On MacOS, all systems have mDNSResponder installed already.

On Linux, it's unclear how common it is to have Avahi installed, nor whether we can install Avahi as part of the Linux CoMapeo installer.

On Windows, the situation seems complicated. We don't think it has mDNS by default. Apple has a Bonjour service for Windows that is installed by a few apps, but it's unclear how to distribute it ourselves.

If we use the native service, then we can use a module such as mdns to wraps that native service.

The alternative is a pure JavaScript implementation. The downside: JS mDNS modules are a bit of a mess, and we have not found one that correctly implements the RFCs, other than @homebridge/ciao, and that is only an advertiser; it does not implement browsing DNS-SD services. Other JS libraries all seem to have bugs or are poorly maintained.

There are a few ways forward:

  1. On MacOS and Linux, we rely on the native service. We require Linux users to install Avahi daemon.
  2. On Windows, we require that users install Bonjour independently.
  3. We offer a fallback JS dns-sd implementation, understanding that it can be unreliable.
  4. We find a way to distribute Bonjour for Windows with the app and install it as part of the app install process.
  5. Implement our own mDNS JS library.

Some links with more info:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant