-
Notifications
You must be signed in to change notification settings - Fork 25
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
Query language enhancements targeting minimal clients #132
Comments
Paging limit for WebSocket using |
RQL queries for related records using E.g. in the example given it is the Senders' |
Restarting WebSocket subscriptions after a disconnection using However, implementing this relies on the Client knowing the appropriate value, i.e. that each Query WebSocket message should have a value equivalent to an |
Copying in the thoughts we have had on My goal is to not define the supported relations for each resource type out-of-band, but to define relations using the existing JSON property definitions. Syntax Basic syntax:
This so far only accounts for references via However, this is not as simple as it seems since those identifiers are only unique within the same Node, and select a sub-object of the Node resource. An expression using Therefore this is currently not supported in this proposal, and could be considered as a reason for defining the supported relations independently of the existing JSON property definitions instead. Semantics One way of describing how relations behave is by transforming them to sub-queries. In general, the Examples:
|
I'm noting a few items here which I've previously discussed with @garethsb-sony just so they're noted down somewhere more public. These are just ideas at present and have not yet been tested out.
Paging limit for WebSockets
At present pagination is not allowed for Query API WebSocket subscriptions. By permitting the
paging.limit
query parameter, minimal clients could restrict the maximum message size a Query API could send. Pairing this with the existingmax_update_rate_ms
parameter would provide greater guarantees over message rates.RQL queries for related records
When writing a client such as a connection manager you can easily filter a single resource type such as Senders. Finding the Flows which relate to these filtered Senders is much harder and typically requires the Flows to be addressed individually, or the entire Flow collection to be consumed. By adding a
rel
(related) RQL query parameter this could be assisted as follows:/flows?query.rql=rel(senders,matches(transport,urn%3Ax-nmos%3Atransport%3Artp))
The query string above would return only the Flows where the related Senders match a particular query. This could be used via the REST API and via WebSocket subscriptions.
Restarting WebSocket subscriptions after a disconnection
If a WebSocket connection is interrupted, the client must create a new WebSocket subscription and consume the initial 'sync' message containing all data matching its query. Whilst this works fine, an optimisation would be to make use of the Query API's paging cursors at subscription creation time. By doing this the Query API could be informed of the most recent change the client is aware of and only pass on changes from that point, avoiding the larger initial sync message.
The text was updated successfully, but these errors were encountered: