tags:

views:

92

answers:

3

what is the best way to support zeroconf names in the location segment of a URI design?

RFC 3986 (Uniform Resource Identifier (URI): Generic Syntax) makes no mention of zeroconf and i fear the URI syntax is not designed to work beyond DNS resolution.

the ideal answer syntax will:

  1. conform to the generic URI syntax
  2. handle zeroconf names with multi-byte characters
A: 

A universal resource identifier is a generic way to locate a resource. For internationalization, you may want to check on IRI, which is almost the same, but allows for full Unicode compatibility. The reason that it doesn't mention Zeroconf is that URI is a generalized protocol. Zeroconf may use URIs are part of its protocol for discovery, but URI will never use specific implementation in its protocol (you won't find ftp:, https:, mailto:, skype: etc in there either)

Zeroconf is a protocol to automatically configure your network and discover available services. It consists of three parts, address selection (part of IPv4/6), name resolution (mDNS) and service discovery (UPnP (Microsoft), DNS-SD (Apple)). Modern operating systems support all of this out of the box.

If we take UPnP, the discovery is done based on a URI, iirc. The returned information is given in XML. XML can be any Unicode encoding. If you're a device driver manufacturer, you can place any character in there. The final phase may be presentation, which is a URL but that's optional.

A URI / URL both support internationalized characters, but only escaped and not in the domain name part.

-- Abel --

Abel
+1  A: 

Here are some options:

dnssd://local/_printer._tcp/Fancy printer/
dnssd://Fancy printer._printer._tcp.local

These strings are IRIs, not URIs, in order to address i18n issues.

See also a discussion in rendezvous-dev.

Andrey Vlasovskikh
A: 

a nested URI is another approach that is backward compatible. a nested URI defines the location for use with discovery protocols like zeroconf.

see 'nested uniform resource identifiers' manuel urena and david larrabeiti

however i dont find evidence this approach in is wide use.

james creasy