Service Discovery¶
There are a few options out there for service discovery. I’m only considering ones that are cross-platform and language-agnostic, so this pretty much means DNS-SD or SLP.
python-zeroconf¶
python-zeroconf appears to be the current winner.
- Native pure-python implementation; no annoying ctypes or external dependencies
- hosted on pypi
- an actual package, complete with tests (TravisCI) and coverage reports
- Little to no logging; I have a branch that fixes this and a few other things
- re-registration of services seems broken (see issue 16) as does responding to requests
- the examples actually run; I got them working on 2 separate machines, but only if the browser was started before the registration happened
- some issues around logging (see issue 15)
- updated relatively recently
- Need to see if this will run in Twisted, or if I’d just run it as a separate process or thread...
pybonjour¶
pybonjour is one option, but it has a lot of drawbacks
- the example code dies for me with mysterious, meaningless exceptions
- not Python3 compatible; there’s a fork that is, but its examples don’t even work under python3
- no testing
- download isn’t actually hosted on pypi
- seems relatively abandoned
- depends on Avahi’s bonjour compatibility libs, or Bonjour, depending on platform
Avahi Bindings¶
- they’re stable, because they’re used by Avahi itself
- testing would be a pain, because they require a bunch of libraries like DBUS and Avahi itself
- uses Avahi over DBUS - doesn’t do things itself, and requires Avahi to be running
- massive external dependencies, no real package
Other Options¶
- anyMesh - A multi-platform, decentralized, auto-discover and auto-connect mesh networking and messaging API
- Twisted and UDP multicast?
- python-brisa UPnP framework SSDP Server
- mdns - Python, no docs, no readme
- txbonjour - a Twisted plugin for Bonjour; looks simple, it might be the right thing if it works - based on pybonjour, so probably a no-go