Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions draft-ietf-moq-transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,32 @@ Reason Phrase {
such as language tags, that would aid comprehension by any entity other than
the one that created the text.

## Representing Namespace and Track Names

There is often the need to render namespace tuples and track names
to be consumed for logging, representing track filename or in
certain authorization verification schemes, for example. The namespace
and track name are binary so they need to be converted to a safe
form. The following format is
RECOMMONDED:

* Each of the namespace tuples are rendered in order with a period
between them followed by the track name with a hyphen between the last
namespace and track name.

* Bytes in the range a-z, A-Z, and 0-9 are are output as is while bytes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems overly restrictive, as there are plenty of printable ASCII chars. I noticed @suhasHere uses full track names like this (/ is inserted as a tuple separator in my log):

000001/app=01/conf=000003/media=C1[h264,width=1920,height=1080,fps=30
,br=2000]/endpoint=0016/

Is there a reason to forbid symbols like ,, =, [, and ]. The less escaping the easier reading logs will be on the eyes.

I do think it's imperative we escape the tuple and namespace/name separators that appear in the names.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can change the way the draft says us to :-) Might be a good reason for this PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI says:
"The ASCII characters considered safe to print to logs are the printable graphic characters, which are decimal codes 32 through 126. These include:
Space (decimal 32)
Alphanumeric characters (a-z, A-Z, 0-9)
Punctuation and symbols (!, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, , ], ^, _, `, {, |, }, ~) "

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's escape whitespace.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind that if we want to align with files draft which I think is good idea, then we need to restrict to the file safe set. This use . which is not always file safe but it should not have a name that ends up starting with .

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably need to go read the files draft, and think about how it uses full-track names encoded as strings. Note that if your first namespace tuple is empty (0 length, which we don't prohibit, I think?), you will get one starting with a dot.

all other bytes are percent encoded as a percent symbol followed by
exactly two lower case hex digits.

For example, if a namespace had two tuples, the first with the bytes
0x48,0x69, the next with bytes 0xFF, and a track name with the byte
0x30 would render as the string "Hi.%ff-0". The goal of this format is
to have a format that is both filename and URL safe. It allows many
common names to be rendered in an easily human readable form while still
supporting all binary values.

TODO - update examples in this draft to match this.

# Object Data Model {#model}

MOQT has a hierarchical data model, comprised of tracks which contain
Expand Down