ietf-tapswg / api-drafts Public
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
Adding a way of forcing the use of specific protocols #327
Conversation
This involes specifying protocol sets on the local endpoint. Note that the text is dependent the introduction of Transport Property Profiles.
I like the fact that this gets added but I think there might be a change required in arch and/or impl that notes how racing behaves and what happens to specified transport properties if one or multiple protocols are forced.
draft-ietf-taps-interface.md
Outdated
| LocalSpecifier.WithProtocols("tcp", "ipv4") | ||
| LocalSpecifier.WithProtocols("tcp", "ipv6") | ||
| ~~~ | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this done on the local endpoint object rather than on the transport properties object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason is that really forcing a protocol end-to-end is hard and requires crypto. Therefore, we only force the protocol at the local endpoint. On the path, there may be proxies or protocol converters, so that the Remote Endpoint may use another protocol. Adding it on the Local Endpoint object makes this explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also find using the endpoint object confusing and agree with Max that it should be a transport property. It is used as a property for the selection and racing so we should keep all this together. (I am not convinced by the argument for why we should use the endpoint object. The path could violate other transport properties as well then.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is another argument why realising this as Transport Property is a little painful: what would the following mean:
transportPorperties.require(protocol, UDP)
transportPorperties.require(protocol, TCP)
transportPorperties.require(protocol, IPv4)
transportPorperties.require(protocol, IPv6)
Does it mean what I intended (require to use TCP or UDP and prefer IPv4), or is this only satisfied by TCPoverUDPoverIPv6overIPv4 or TCPoverUDPoverIPv4overIPv6?
NewLocalEndpoint.WithProtocols("udp","tcp")
NewLocalEndpoint.WithProtocols("IPv4","IPv6"),
Is clear - I want either TCP or UDP over IPv4 or IPv6 - and does not allow to use other preferences and thus reduces complexity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the example that you give here makes the endpoint case clear because you assume an implicit "or" between parameters of one call. In the other case, you arrive at something ambiguous because you have only one flat property called "protocol".
The distinction that creates the problem here, to me, isn't about the local endpoint or use of a transport property; it's about semantics of the defined call that you use (or assume).
|
I like this extension, and thanks for opening the issue. As written, it leaves me guessing about at least one assumption, which I think would be: If the constrained protocol choice conflicts with the default TransportProperties, the TransportProperties also must be set to something compatible, or you'd get an error when calling connect or listen, correct? In particular, I think this would always fail with error: Fixing it would require explicitly suppressing the several default-require transport properties that conflict with udp in order to have a chance at not erroring: Is that expected? Does it need to be made explicit? And was there an intent for this to be made simpler with protocol-based profiles for TransportProperties? |
|
I suspect with the addition of profiles, the solution should rather look like: with "unreliable datagram" implying |
|
See PR #328 for a concrete proposal for profiles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better, thanks for checking my inputs. Will comment on the integrated text, unless there is more debate
|
I'm confused: after you have #328, why do you need this? |
|
@britram I share your confusion after re-reading it… there was something mixed up. I see the following two cases:
|
|
It just occurred to me to wonder: Is there any reason we shouldn't do exact protocol selection as an inheriting subclass of a transport property profile? So maybe "exact-udp" inherits from "unreliable-datagram", and app designer just picks what they need as a transport profile? I usually don't much care for inheritance, but are there cases where this wouldn't be as good or better? |
…bln/explicit-protocols
…y Selection Property
|
As suggested several times, I changed the way of forcing specific protocol stacks into an ordinary Selection Property. This comes at the cost of introducing a list type for properties. @GrumpyOldTroll I don't think inheritance solves the problem here, as one may want to give the transport system a choice between multiple sets of protocols. For example, SIP is defined to operate over SCTP, UDP or TCP – therefore, we would need a fairly generic set of Selection Properties that allows to use any of these and the newly introduced Property to force to us no other matching protocol. |
|
Okay. I'm still not a giant fan of this, because I'm pretty sure it'll get abused. Some extra text stating that this is basically only intended for special circumstances (e.g., implementing a layer-4+-topped stack over a specific layer-4-topped stack) would address that as best we can in an abstract API, though. |
|
I'm also not a fan. I think it should be a bit hard to force use of one specific protocol because the whole idea of this exercise is to have an interface that is NOT protocol-specific. |
|
I thought the text in this PR is already quite clear that this property is only for wired special cases. @britram please make a suggestion how to make the text even more hostile for people that want to use the property. |
|
Per discussion on #324, we're going to do this another way. |
This fixes issue #324.
The solution involves specifying protocol sets on the local endpoint.
Note that the text is dependent the introduction of Transport Property Profiles.