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
Wildcard usage #284
Comments
+1
…On Thu, 6 Dec 2018 at 05:11, Ulf Björkengren ***@***.***> wrote:
In the example in the document Transport-ch. 6.1.22 you find two wildcards
in the URL path, see below.
POST /VSS-Root/Cabin/Door/*/*/IsLocked HTTP/1.1
This example was derived from a VISS example with a path expression having
only one wildcard
"path": "Signal.Cabin.Door.*.IsLocked"
Which from other parts of that example could be understood to represent
two path segments having four matches [Row1.Left, Row1.Right, Row2.Left,
Row2.Right].
Why do I propose that the one wildcard in the VISS example shall be
replaced by two wildcards?
From a client convenience view the alternative with one wildcard seems the
preferred, but from a server implementation view the alternative with two
wildcards is the preferable.
The server implementation complexity is as I see it significantly
increased in the case one wildcard can represent multiple path segments,
AND the path expression contains named segments following after the
wildcard.
Restricting the wildcard to represent one path segment is not necessary
from an implementation complexity point of view when the wildcard is in the
last path segment, e. g. “VSS-Root.Cabin.Door.*”.
The obvious argument against this restriction is that it requires the
client to have knowledge of the actual tree it is searching. This knowledge
is at least available via a service discovery request.
I believe there is a risk with the more complex “multiple segment
wildcard” alternative that different server implementations may show
interoperability problems.
Hence I think we should select the alternative where a wildcard only
represents all possible nodes for one path segment.
In the specification I think a chapter layout as below could be used. I
can volunteer to write the wildcard subchapter along proposed choice above.
X. Search mechanisms
X.1. Wildcard
X.2. Query
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#284>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMBf_gEKdCrOM3r9WY805wmCMhURem1yks5u2RdvgaJpZM4ZGeqL>
.
|
Have you seen how viwi handles these kind of queries? POST <service>/<resource>/?id=<id1>,<id2> HTTP1.1
{
"Locked": true
} To lock the elements with IDs and I strongly recommend not to support wildcards in the url as a client might not even be aware which elements will be actually affected by a change...
|
So you say that the request |
POST <service>/<resource>/?id=<id1>,<id2> HTTP1.1 is similar to GET <service>/<resource>/?id=<id1>,<id2> HTTP1.1 selecting ALL elements which have their combining it with the
sets the The advantage over running multiple queries - which is also possible - is of course that this operation would mean less traffic but even more important either fails or succeeds collectively. So if just one door can not be locked, you get back an error, only if all lock you get back
Side Note / Disclaimer I would finalize the VSS / VISS spec and make viwi the RSI, make it standard grade and see if it lacks anything I / we have not thought of. Also compare it to GraphQL and see if we could just use GraphQL and abandon viwi / RSI in general if we do not need it. => I do not want to keep it just for the sake of having it. |
So, my take on wildcards is that it could and should be used for subscriptions , that is as for the VISS 1.0 model if that approach is kept. It does complicate the server implementation and we should perhaps add a error statement that could be used by implementations when we violate or pass some performance threshold. I don't think we should add it to HTTP requests as explained above . |
Short intermediate summary of the current state of discussions: |
In the example in the document Transport-ch. 6.1.22 you find two wildcards in the URL path, see below.
POST /VSS-Root/Cabin/Door///IsLocked HTTP/1.1
This example was derived from a VISS example with a path expression having only one wildcard
"path": "Signal.Cabin.Door.*.IsLocked"
Which from other parts of that example could be understood to represent two path segments having four matches [Row1.Left, Row1.Right, Row2.Left, Row2.Right].
Why do I propose that the one wildcard in the VISS example shall be replaced by two wildcards?
From a client convenience view the alternative with one wildcard seems the preferred, but from a server implementation view the alternative with two wildcards is the preferable.
The server implementation complexity is as I see it significantly increased in the case one wildcard can represent multiple path segments, AND the path expression contains named segments following after the wildcard.
Restricting the wildcard to represent one path segment is not necessary from an implementation complexity point of view when the wildcard is in the last path segment, e. g. “VSS-Root.Cabin.Door.*”.
The obvious argument against this restriction is that it requires the client to have knowledge of the actual tree it is searching. This knowledge is at least available via a service discovery request.
I believe there is a risk with the more complex “multiple segment wildcard” alternative that different server implementations may show interoperability problems.
Hence I think we should select the alternative where a wildcard only represents all possible nodes for one path segment.
In the specification I think a chapter layout as below could be used. I can volunteer to write the wildcard subchapter along proposed choice above.
X. Search mechanisms
X.1. Wildcard
X.2. Query
The text was updated successfully, but these errors were encountered: