tango object full names are not strict URIs

Hi,

I am reading the chapter C.2 of the tango manual (Tango object naming) and I see that the full name object names are "almost" URIs but not quite.

This is an inconvenience for Taurus, which uses RFC3986-compliant URIs which are slightly different from the tango names


According to the tango manual, the tango naming schema is:
[protocol://][host:port/]device_name[/attribute][->property][#dbase=xx]

The most problematic part (which is a common misunderstanding of URIs) is assuming that "://" is the separator between the protocol and the rest of the URI.

According to RFC3986, the separator should be ":", and the "//" is a prefix that must be there if and only if the "authority" (i.e., [host:port]) is present in the name.

In practice this means that
`tango://freak:2345/id11/rv/1`
is a valid URI, while
`tango://id11/rv/1`
is not a valid URI (it should be `tango:id11/rv/1`)

Also, it means that
`gizmo:20000/sr/d-ct/1`
is not a valid URI because the host:port, when present, must be preceded by '//' even when the protocol is omitted,. Therefore, the valid URI would be:
`//gizmo:20000/sr/d-ct/1`
(note that, otherwise, if one wants to support arbitrary protocol names such as in taurus, `gizmo:20000/sr/d-ct/1` would be ambiguous because "gizmo" could be a protocol)

Another problematic part (although not critical for taurus) is the use of "->" for the properties, since ">" is a reserved character in URIs.

In summary, IMHO Tango should consider changing to (or at least simultaneously supporting) the following naming scheme:

[protocol:][//host:port/]device_name[/attribute][->property][#dbase=xx]

(or, if you want to be more strict, replace the "->" property separator by something else, for example ":")

[protocol:][//host:port/]device_name[/attribute][:property][#dbase=xx]

In terms of implementation, RFC3986 Appendix B provides a useful regexp to match proper URIs. Also, in Taurus4, we implemented regexp-based Tango URI validators which handle things such as device names given as device alias, etc.


What do you think?
Any chance of this being addressed for tango10?

Cheers,

Carlos


Here is my 2-cents input:

Would be nice if Tango uses REST API compatible URIs. Then using the same URIs structure the protocol may define the format of the response, e.g. tango: - binary format protocol specific for tango; http: - HTTP response etc Is it feasible?
 
Register or login to create to post a reply.