Skip to content
Open
Changes from 7 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
59 changes: 59 additions & 0 deletions draft-ietf-moq-transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,65 @@ multi-object stream will expire earlier than Objects later in the stream. Once
Objects have expired from cache, their state becomes unknown, and a relay that
handles a downstream request that includes those Objects re-requests them.

#### OBJECT FILTER Parameter

The OBJECT_FILTER parameter(Parameter Type 0x05) MAY appear in SUBSCRIBE,
SUBSCRIBE_UPDATE, PUBLISH_OK, TRACK_STATUS or FETCH message. It is a structure
Copy link
Collaborator

Choose a reason for hiding this comment

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

how about adding this to SubscribeNamespace as well ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's unclear what adding a filter to SUBSCRIBE_NAMESPACE would do without #1047? Or you have different use cases in mind? Let's keep this focused on subscriptions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

adding it to namespace will enable object filtering across the tracks, where the base case is a single subscription . I was suggesting it would be nice to think the filter more generically

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@suhasHere I am amenable to using the same parameter to filter Tracks in response to SUBSCRIBE_NAMESPACE rather than Objects in SUBSCRIBE, but it requires more semantics (for example, most operands defined here don't make any sense). Can you file an issue explaining the requirements for Track filtering first?

indicating Objects or ranges of Objects that the Publisher will deliver.

~~~
Object Filter {
Type (0x5),
Length (i),
Operand (7),
Negation Flag (1),
[Extension ID (i),]
Values (..) ...
}
~~~

Operand | Meaning
0x0 | No Filter
0x1 | Group ID
0x2 | Subgroup ID
0x3 | Object ID
0x4 | Extension ID
0x5 | Publisher Priority

When Negation Flag is 1, the result of the filter is negated to determine which
Objects pass the filter.

Extension ID is present only when Operand is Extension ID (value 0x4) and
indicates the Extension to filter. This MUST indicate an Extension with an
integer type. Objects without the Extension do not pass the filter.

Values is an array of integers which encode the values of interest. The
array is a sequence of pairs indicating the start and length of
the matching range. The Start is encoded as a delta from the previous End, or
from 0 for the first element. The length indicates the number of elements
including Start to match. An odd number of elements indicates the final range
Comment on lines +1671 to +1672
Copy link
Contributor

Choose a reason for hiding this comment

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

If we specify the length field to indicate the number of elements minus 1, then the same number of bits can represent more elements, i.e., the capability or bit efficiency is slightly improved.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It only saves one value though at the expense of some readability?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. Just a suggestion for consideration. In some other standards this is always done.

has no endpoint. For example [ 10, 3, 1, 1, 20 ] would match values 10, 11, 12,
14 and 34-max. Only the first value can be 0. If an endpoint receives a 0
value anywhere else or length of the Values array exceeds TBD, it MUST reject
the request with `INVALID_FILTER`.

All filters can be removed from a Subscription by sending SUBSCRIBE_UPDATE with
Operand No Filter.

This parameter MAY appear up to TBD2 times in a request, and filters are
cumulative. If the parameter appears more than TBD2 times, the endpoint MUST
reject the request with `INVALID_FILTER`. When filters are applied, delivery
rules regarding FETCH responses are modified (see {{message-fetch}}). In a
filtered FETCH response, the Subscriber can only infer Objects do not exist from
their absence if they pass all filters. This is only possible when filtering on
Group ID and/or Object ID, as the Subscriber lacks other fields needed to
evaluate the filters.

Publishers MUST respect Subgroup delivery rules even for filtered responses. If
an Object in the middle of a Subgroup is filtered out, the Publisher MUST NOT
place another Object in that Subgroup stream (see {{closing-subgroup-streams}}).


## CLIENT_SETUP and SERVER_SETUP {#message-setup}

The `CLIENT_SETUP` and `SERVER_SETUP` messages are the first messages exchanged
Expand Down