Subject: [Uri-review] Scheme with both hierarchical and non-hierarchical elements

From: Adrian Hope-Bailie <[email-masked]>
Date: Thu, 17 Sep 2015 10:14:40 +0200

Hi list,

My company is in the process of designing a URI scheme to address resources
that are part of a complex distributed system.

Some of the resources make sense to be addressed via a hierarchical syntax
as they have sub-resources and related resources which could be addressed
relative to the parent.

eg: scheme://root-resource/sub-resource/other-relative-resource

However, there are other resources which do not fit this pattern. They
stand alone and I am considering using a different syntax for these.

eg: scheme:namespace:resource-identifier

Is it considered bad practice to have a URI scheme that mixes these two
forms?

Thanks for the help,
Adrian

---

From: Sean Leonard <[email-masked]>
Date: Thu, 17 Sep 2015 07:49:43 -0700

My 2¢ is that it is *good* practice. If you are going to have a resource 
or protocol where network names and non-network names need to be 
addressed, it makes sense to use the same scheme. Conserve the URI 
scheme namespace.

There are not too many examples of dual-syntax URIs that I am aware of 
yet, although this was discussed in the context of irc: URIs on the 
apps-discuss mailing list last year (check the history).

Another alternative for your non-hierarchical resources is to establish 
a new URN namespace, or create names in the context of existing URNs. 
However, the URN work is in flux and so I would not recommend that path 
unless you are really sure you know what you are getting into. Also, 
URNs are supposed to be stable and unchanging, which may not be what you 
are looking for.

Sean

On 9/17/2015 1:14 AM, Adrian Hope-Bailie wrote:
> Hi list,
>
> My company is in the process of designing a URI scheme to address 
> resources that are part of a complex distributed system.
>
> Some of the resources make sense to be addressed via a hierarchical 
> syntax as they have sub-resources and related resources which could be 
> addressed relative to the parent.
>
> Is it considered bad practice to have a URI scheme that mixes these 
> two forms?
>
> Thanks for the help,
> Adrian
>
>
> _______________________________________________
> Uri-review mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/uri-review

---

From: Sean Leonard <[email-masked]>
Date: Sat, 19 Sep 2015 07:05:22 -0700

Found an example of dual-pattern (with authority and without authority) 
URI scheme: xmpp. See RFC 5122.

Sean

---

From: Adrian Hope-Bailie <[email-masked]>
Date: Sat, 19 Sep 2015 22:13:29 +0200

Hey Sean,

Thanks for the help and taking the time. It's much appreciated.

Adrian