Subject: [Tsv-art] TSV-ART review of draft-ietf-core-coap-tcp-tls-07

From: Yoshifumi Nishida <[email-masked]>
Date: Sat, 8 Apr 2017 20:53:11 -0700

Document: draft-ietf-core-coap-tcp-tls-07
Reviewer: Yoshifumi Nishida

I've reviewed this document as part of TSV-ART's ongoing effort to review
key IETF documents. These comments were written primarily for the transport
area directors, but are copied to the document's authors for their
information and to allow them to address any issues raised.When done at the
time of IETF Last Call, the authors should consider this review together
with any other last-call comments they receive. Please always CC
[email-masked] if you reply to or forward this review.

Summary: This document is well-written. It is almost ready to be published
as a PS draft once the following points are addressed.

1: It is not clear how the protocol reacts the errors from transport layers
(e.g. connection failure).
   The protocol will just inform apps of the events and the app will decide
what to do or the protocol itself will do something?

2: There will be situations where the app layer is freezing while the
transport layer is still working. Since transport layers cannot detect this
type of failures, there should be some mechanisms for it somewhere in the
protocol or in the app layer.  The doc needs to address this point. For
example, what will happen when a PONG message is not returned for a certain
amount of time?

3: Since this draft defines new SZX value, I think the doc needs to update
RFC7959. This point should be clarified more in the doc.

--
Yoshi

---

From: Carsten Bormann <[email-masked]>
Date: Sun, 9 Apr 2017 09:25:21 +0200

Hi Yoshi,

thank you very much for your thoughtful review.

For now, let me pick one of your comments:

> 3: Since this draft defines new SZX value, I think the doc needs to update RFC7959. This point should be clarified more in the doc.

The spec does indeed define a new SZX value, for use with the environments this document is used in (reliable transports).  It does not change or add anything to the way RFC 7959 is used with the existing unreliable transports; as such it does not really update RFC 7959 as much as it does extend it for its own purposes.
(However, the same argument could be made for RFC 7641, which we do say we update.)

Maybe we are not making the point forcefully enough that SZX=7 is meant for use within this spec?
(Again, however: any other future COAP transports that have larger messages might pick up SZX=7 as well.)

I don’t have a strong opinion on how to populate the “updates” graph of RFCs in these boundary cases; it might help to get some more guidance here.

Grüße, Carsten

---

From: Yoshifumi Nishida <[email-masked]>
Date: Sun, 9 Apr 2017 14:24:09 -0700

Hi Carsten,

On Sun, Apr 9, 2017 at 12:25 AM, Carsten Bormann <[email-masked]> wrote:

> > 3: Since this draft defines new SZX value, I think the doc needs to
> update RFC7959. This point should be clarified more in the doc.
>
> The spec does indeed define a new SZX value, for use with the environments
> this document is used in (reliable transports).  It does not change or add
> anything to the way RFC 7959 is used with the existing unreliable
> transports; as such it does not really update RFC 7959 as much as it does
> extend it for its own purposes.
> I don’t have a strong opinion on how to populate the “updates” graph of
> RFCs in these boundary cases; it might help to get some more guidance here.
>

Ok, I see the point. I don't have a strong opinion here either as I am not
a COAP expert.
It could be enough if the draft has more texts to articulate that it won't
cause conflict with unreliable transport COAP.
--
Yoshi

---

From: Brian Raymor <[email-masked]>
Date: Thu, 20 Apr 2017 19:31:38 +0000

Thanks for your feedback.

> 1: It is not clear how the protocol reacts the errors from transport layers (e.g. connection failure).
>    The protocol will just inform apps of the events and the app will decide what to do or the protocol itself will do something?

The WebSockets case is addressed by RFC6455:

   When the underlying TCP connection is closed, it is said that _The
   WebSocket Connection is Closed_ and that the WebSocket connection is
   in the CLOSED state.  If the TCP connection was closed after the
   WebSocket closing handshake was completed, the WebSocket connection
   is said to have been closed _cleanly_.

-and-

   If at any point the underlying transport layer connection is
   unexpectedly lost, the client MUST _Fail the WebSocket Connection_.

It's possible to add language similar to the abort case, along the lines of "When the underlying TCP connection is closed or reset, the CoAP connection is closed and in flight messages may be lost".

> transport layer is still working. Since transport layers cannot detect 
> this type of failures, there should be some mechanisms for it somewhere in the protocol or in the app layer.  The doc needs to address
> this point. For example, what will happen when a PONG message is not returned for a certain amount of time?

PONG is modeled on similar mechanisms in RFC6455 and RFC7540. Neither provides any guidance for this case. It's expected that an application framework would define and enforce the appropriate policy for timeouts or retries.
 
> 3: Since this draft defines new SZX value, I think the doc needs to update RFC7959. This point should be clarified more in the doc.

Carsten responded to this issue and the final exchange is here - https://www.ietf.org/mail-archive/web/core/current/msg08562.html 

My sense is that we should treat this as an update to RFC7959 based on the original language:

     The value 7 for SZX (which would
      indicate a block size of 2048) is reserved, i.e., MUST NOT be sent
      and MUST lead to a 4.00 Bad Request response code upon reception
      in a request.

and the use of "extension" in coap-tcp-tls:

    The ’Block-wise Extension for Reliable Transport (BERT)’ extends the Block protocol
    to enable the use of larger messages over a reliable transport.

The existing IANA entries for Block1 and Block2 will also need to reference coap-tcp-tls in addition to RFC7959.

Tracking in https://github.com/core-wg/coap-tcp-tls/issues/129

---

From: "weigengyu" <[email-masked]>
Date: Fri, 21 Apr 2017 13:08:43 +0800

Hi，

> It's possible to add language similar to the abort case, along the lines 
> of "When the underlying TCP connection is closed or reset,
> the CoAP connection is closed and in flight messages may be lost".

It is not necessary when CoAP over WEBSocket is concerned, I think.
By the API or the interface, CoAP only interacts with WEB socket, does not 
need to touch issues of TCP.
CoAP would react to the events of WebSokcet.

But, issues on TCP should be concerned if it is CoAP over TCP.

Regards,

Gengyu WEI
Network Technology Center
School of Computer
Beijing University of Posts and Telecommunications
-----原始邮件----- 
From: Brian Raymor
Sent: Friday, April 21, 2017 3:31 AM
To: Yoshifumi Nishida ; [email-masked]
Cc: [email-masked] ; [email-masked] ; [email-masked]
Subject: Re: [core] TSV-ART review of draft-ietf-core-coap-tcp-tls-07

>    The protocol will just inform apps of the events and the app will 
> decide what to do or the protocol itself will do something?

-and-

It's possible to add language similar to the abort case, along the lines of 
"When the underlying TCP connection is closed or reset, the CoAP connection 
is closed and in flight messages may be lost".

> this type of failures, there should be some mechanisms for it somewhere in 
> the protocol or in the app layer.  The doc needs to address

PONG is modeled on similar mechanisms in RFC6455 and RFC7540. Neither 
provides any guidance for this case. It's expected that an application 
framework would define and enforce the appropriate policy for timeouts or 
retries.

> RFC7959. This point should be clarified more in the doc.

Carsten responded to this issue and the final exchange is here - 
https://www.ietf.org/mail-archive/web/core/current/msg08562.html

My sense is that we should treat this as an update to RFC7959 based on the 
original language:

    The ’Block-wise Extension for Reliable Transport (BERT)’ extends the 
Block protocol
    to enable the use of larger messages over a reliable transport.

The existing IANA entries for Block1 and Block2 will also need to reference 
coap-tcp-tls in addition to RFC7959.

_______________________________________________
core mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/core

---

From: Yoshifumi Nishida <[email-masked]>
Date: Fri, 21 Apr 2017 01:25:38 -0700

Hi Brian,

On Thu, Apr 20, 2017 at 12:31 PM, Brian Raymor <[email-masked]>
wrote:

> of "When the underlying TCP connection is closed or reset, the CoAP
> connection is closed and in flight messages may be lost".
>

OK. I also think we should state that the protocol should notify the
failure events to applications.
Since errors can happen not only in TCP, but also TLS and websocket level,
mentioning only TCP close or reset might not be enough.

> > this type of failures, there should be some mechanisms for it somewhere
> in the protocol or in the app layer.  The doc needs to address

The figure 1 in the draft indicates that this draft and RFC7252 are in the
same level.
So, I am looking at this draft and 7252.
When we use 7252, I think applications basically don't need to implement
timeouts or retry mechanisms as the protocol provides such things.
However, when we use this one, it seems applications will need to have such
mechanisms. Isn't it a bit confusing? I am thinking that there need to be
some guidance here.
BTW, PONG is one example.

> I don't have a strong opinion here. Updating 7959 is fine for me if it's
clearer to CoAP people.

Thanks,
--
Yoshi

---

From: Brian Raymor <[email-masked]>
Date: Fri, 21 Apr 2017 18:15:41 +0000

Hi Yoshi,

> OK. I also think we should state that the protocol should notify the failure events to applications.

> Since errors can happen not only in TCP, but also TLS and websocket level, mentioning only TCP close or reset might not

> be enough.

After reviewing with the authors, an additional clarification was appended to 3.4 Connection Health - https://github.com/core-wg/coap-tcp-tls/pull/140/files

The opinion of the authors (and Gengyu WEI’s recent response - https://www.ietf.org/mail-archive/web/core/current/msg08622.html) is that RFC6455 covers the WebSocket case and does not need to be repeated here.

> When we use 7252, I think applications basically don't need to implement timeouts or retry mechanisms as the protocol

> provides such things.

RFC7252 provides timeouts and retries because it's implementing a TCP-like reliability mechanism over UDP - https://tools.ietf.org/html/rfc7252#section-2.1

> However, when we use this one, it seems applications will need to have such mechanisms. Isn't it a bit confusing? I am thinking that

> there need to be some guidance here.

> BTW, PONG is one example.

For coap-tcp-tls, there are multiple early implementations. This has never been reported as a source of confusion.

> I don't have a strong opinion here. Updating 7959 is fine for me if it's clearer to CoAP people.

I've merged the change - https://github.com/core-wg/coap-tcp-tls/pull/138/files

Thanks again for helping us to improve the quality of the draft,

…Brian

---

From: Yoshifumi Nishida <[email-masked]>
Date: Fri, 21 Apr 2017 14:07:52 -0700

Hi Brian,

Just in case,
Reliable transports only provide reliability at transport level. It doesn't
provide reliability in application protocol level.

RFC7252 has reliability mechanisms in it since it uses UDP. This means it
has abilities to check both transport and app level reliability.
This draft only provides transport level reliability and apps will need to
detect app protocol failure by themselves.
This means 7252 and this draft are not totally equivalent from the
viewpoint of applications.

I am not saying this is wrong or bad, but I believe app developer should
aware this point.
--
Yoshi

On Fri, Apr 21, 2017 at 11:15 AM, Brian Raymor <[email-masked]>
wrote:

> > Since errors can happen not only in TCP, but also TLS and websocket
> level, mentioning only TCP close or reset might not
>
> > be enough.
>
>
>
> After reviewing with the authors, an additional clarification was appended
> to 3.4 Connection Health - https://github.com/core-wg/
> coap-tcp-tls/pull/140/files
>
>
>
> The opinion of the authors (and Gengyu WEI’s recent response -
> https://www.ietf.org/mail-archive/web/core/current/msg08622.html) is that
> RFC6455 covers the WebSocket case and does not need to be repeated here.
>
>
>
> timeouts or retry mechanisms as the protocol
>
> > provides such things.
>
>
>
> RFC7252 provides timeouts and retries because it's implementing a TCP-like
> reliability mechanism over UDP - https://tools.ietf.org/html/
> rfc7252#section-2.1
>
>
>
> > However, when we use this one, it seems applications will need to have
> such mechanisms. Isn't it a bit confusing? I am thinking that
>

---

From: Brian Raymor <[email-masked]>
Date: Fri, 21 Apr 2017 21:57:38 +0000

I think that I understand your perceptions better. Prior to adoption of coap-tcp-tls and before I was active in the WG, I recall discussions related to the confusion over application vs transport reliability in CoAP especially as related to CON and NON. What was intended?

Tim Carey outlined some concerns in:
https://tools.ietf.org/html/draft-carey-core-std-msg-vs-trans-adapt-00#section-2

This topic was presented in detail at IETF 93 - https://www.ietf.org/proceedings/93/slides/slides-93-core-0.pdf - starting on slide 23.

And in a related thread on the mailing list back in 2015 - https://www.ietf.org/mail-archive/web/core/current/msg06280.html - Carsten responded:

> In any case, CON and NON are about message layer semantics, not about application semantics
> -- you gave them a meaning they don't have.

By IETF 94, the authors were reporting – “Most of the Confusion around              CON/NON was resolved”.

Where relevant, I’ve added clarifications - such as the Appendix related to differences in Observe for reliable transports.

Both Carsten and Hannes could probably offer more context if needed.

From: Yoshifumi Nishida [mailto:[email-masked]]
Sent: Friday, April 21, 2017 2:08 PM
To: Brian Raymor <[email-masked]>
Cc: Yoshifumi Nishida <[email-masked]>; [email-masked]; [email-masked]; [email-masked]; [email-masked]
Subject: Re: TSV-ART review of draft-ietf-core-coap-tcp-tls-07

Hi Brian,

Just in case,
Reliable transports only provide reliability at transport level. It doesn't provide reliability in application protocol level.

RFC7252 has reliability mechanisms in it since it uses UDP. This means it has abilities to check both transport and app level reliability.
This draft only provides transport level reliability and apps will need to detect app protocol failure by themselves.
This means 7252 and this draft are not totally equivalent from the viewpoint of applications.

I am not saying this is wrong or bad, but I believe app developer should aware this point.
--
Yoshi

On Fri, Apr 21, 2017 at 11:15 AM, Brian Raymor <[email-masked]<mailto:[email-masked]>> wrote:

Hi Yoshi,

…Brian

---

From: Yoshifumi Nishida <[email-masked]>
Date: Sat, 29 Apr 2017 21:24:37 -0700

Hello,
As far as I've read -08 draft, I think this point has not been addressed
yet. I hope some folks could elaborate a bit more if they think this is not
an important point for the draft.
--
Yoshi

On Fri, Apr 21, 2017 at 2:57 PM, Brian Raymor <[email-masked]>
wrote:

> I think that I understand your perceptions better. Prior to adoption of
> coap-tcp-tls and before I was active in the WG, I recall discussions
> related to the confusion over application vs transport reliability in CoAP
> especially as related to CON and NON. What was intended?
>
>
>
> This topic was presented in detail at IETF 93 -
> https://www.ietf.org/proceedings/93/slides/slides-93-core-0.pdf -
> starting on slide 23.
>
>
>
> And in a related thread on the mailing list back in 2015 -
> https://www.ietf.org/mail-archive/web/core/current/msg06280.html -
> Carsten responded:
>
>
>
> Where relevant, I’ve added clarifications - such as the Appendix related
> to differences in Observe for reliable transports.
>
>
>
> *From:* Yoshifumi Nishida [mailto:[email-masked]]
> *Sent:* Friday, April 21, 2017 2:08 PM
> *To:* Brian Raymor <[email-masked]>
> *Cc:* Yoshifumi Nishida <[email-masked]>; [email-masked];
> [email-masked]; [email-masked]; [email-masked]
> *Subject:* Re: TSV-ART review of draft-ietf-core-coap-tcp-tls-07
>
>
>
> Hi Brian,
>
>
>
> Just in case,
>
> Reliable transports only provide reliability at transport level. It
> doesn't provide reliability in application protocol level.
>
>
>
> to 3.4 Connection Health - https://github.com/core-wg/coa
> p-tcp-tls/pull/140/files
>
>
>
> reliability mechanism over UDP - https://tools.ietf.org/html/rf
> c7252#section-2.1
>
>
>