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

Should we Bring Back Short Form URI? #83

Closed
stevenhartley opened this issue Mar 14, 2024 · 8 comments
Closed

Should we Bring Back Short Form URI? #83

stevenhartley opened this issue Mar 14, 2024 · 8 comments
Assignees
Labels
question Further information is requested
Milestone

Comments

@stevenhartley
Copy link
Contributor

Older version of uri.adoc use to also have a URI format called Short Form. Short URI was a string representation of the numbers inside of UUri object, example below:

up://192.168.1.100/2/1.1/5000

In the above example. UAuthority was the IP address, uService id is 2, verison of the service is 1.1, and the topic ID (the publish topic) was 5000.
It was thought that this version would not be needed so it was removed from up-java and the specification however we see strong benefits of this URI format for zenoh and MQTT that require strings for topic names.

This issue is to address if we should bring back short form URIs for zenoh & MQTT (and possibly other transports) in lieu of micro form that is difficult to use unless you're writing raw bytes to a transport "wire".

@stevenhartley stevenhartley added the question Further information is requested label Mar 14, 2024
@evshary
Copy link
Contributor

evshary commented Mar 14, 2024

From Zenoh perspective, using the short URI is easier to generate Zenoh key.

  • Long URI: Need to deal with escaping illegal character in Zenoh
  • Micro URI: Need to transform the binary into hex string

However, I'm just wondering whether this will cause a problem for users if they need to define Long/Short/Micro format while declaring the UURI?

@PLeVasseur
Copy link
Contributor

I think this makes a lot of sense for protocols like MQTT and Zenoh.

@evshary -- btw, just wanted to make sure that you're still able to take a UUri containing only a UAuthority and still form a Zenoh KeyExpr then like this: up://192.168.1.100/**

You may need to submit a PR upstream to up-rust to add functionality to serialize only a UAuthority to long form / string.

@evshary
Copy link
Contributor

evshary commented Mar 14, 2024

Hi @PLeVasseur

btw, just wanted to make sure that you're still able to take a UUri containing only a UAuthority and still form a Zenoh KeyExpr then like this: up://192.168.1.100/**

I think I still need to do some minor transformations.

  • with UAuthority: upr/192.168.1.100/4/1
  • w/o UAuthority: upl/4/1
  • For the special UUri: upr/192.168.1.100/**

The main reason is that up:// is not available in Zenoh key, and I think it can be replaced by upr or upl.

You may need to submit a PR upstream to up-rust to add functionality to serialize only a UAuthority to long form / string.

Do you mean short form?

@PLeVasseur
Copy link
Contributor

I think I still need to do some minor transformations.

Makes sense to me.

Do you mean short form?

Perhaps? I'm unclear on if long and short form differ when it comes to the UAuthority, since it seems like in any case they are turned into string representations.

@evshary
Copy link
Contributor

evshary commented Mar 15, 2024

Perhaps? I'm unclear on if long and short form differ when it comes to the UAuthority, since it seems like in any case they are turned into string representations.

Yes, but only the IP format is available in short form. While considering long form, we might need to deal with some special characters.

@PLeVasseur
Copy link
Contributor

Oh really? I think it's also possible to use the id. Basically either of the two numeric representations of UAuthority, ip or id. I think @stevenhartley answered that way to @tamarafischer when it came up in our meeting.

@evshary
Copy link
Contributor

evshary commented Mar 15, 2024

I saw it from the old spec. Maybe we can check with @stevenhartley
image
If there is no special character in UAuthority, then that's fine with Zenoh key.

stevenhartley pushed a commit that referenced this issue Mar 15, 2024
this change also copies over the legal documents and fixes up other parts of the specification.

#83
stevenhartley pushed a commit that referenced this issue Mar 27, 2024
* Add back Short Form URI

this change also copies over the legal documents and fixes up other parts of the specification.

#83

* Removed zombie file

* Address comments and put examples back together.
@stevenhartley stevenhartley self-assigned this Apr 3, 2024
@stevenhartley stevenhartley added this to the v1.0.0-alpha.1 milestone Apr 3, 2024
@stevenhartley
Copy link
Contributor Author

resolved in the spec

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

No branches or pull requests

3 participants