Re: [core] Retransmission of non-confirmable response message upon receiving request message retranmission?

"Kraus Achim (INST/ECS4)" <Achim.Kraus@bosch-si.com> Fri, 29 November 2019 12:20 UTC

Return-Path: <Achim.Kraus@bosch-si.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DEB83120241 for <core@ietfa.amsl.com>; Fri, 29 Nov 2019 04:20:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.301
X-Spam-Level:
X-Spam-Status: No, score=-4.301 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=bosch-si.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6PIHMkug5Hb9 for <core@ietfa.amsl.com>; Fri, 29 Nov 2019 04:20:21 -0800 (PST)
Received: from de-out1.bosch-org.com (de-out1.bosch-org.com [139.15.230.186]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B7FDA120232 for <core@ietf.org>; Fri, 29 Nov 2019 04:20:20 -0800 (PST)
Received: from fe0vm1650.rbesz01.com (unknown [139.15.230.188]) by si0vms0216.rbdmz01.com (Postfix) with ESMTPS id 47PYVp2ghxz1XLm48; Fri, 29 Nov 2019 13:20:18 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bosch-si.com; s=key2-intmail; t=1575030018; bh=X6q1kXa2qsbUfDuCGTFdDmLjB8x2KQczOzEPeTibrQM=; l=10; h=From:Subject:From:Reply-To:Sender; b=EkbV6p64fmv2yBMNn6/JVEOqL7qwwqyqy402m4jpic+sfWaDy7DjQ8U/w7l7aIg+5 50wUcuQOZfRdnS1z+sicSvobarsX+n/f4EEX920hYgXo01GbQ3mKvfPgSjIooV+bgB 7t80rbIxSiRqiS0FcHf2YsC5ZDqFah4CPapLXJ4w=
Received: from si0vm02576.rbesz01.com (unknown [10.58.172.176]) by fe0vm1650.rbesz01.com (Postfix) with ESMTPS id 47PYVp2Nhwz326; Fri, 29 Nov 2019 13:20:18 +0100 (CET)
X-AuditID: 0a3aad0d-529ff700000030a7-79-5de10d0242b0
Received: from si0vm1949.rbesz01.com ( [10.58.173.29]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by si0vm02576.rbesz01.com (SMG Outbound) with SMTP id 63.45.12455.20D01ED5; Fri, 29 Nov 2019 13:20:18 +0100 (CET)
Received: from SI-MBX2033.de.bosch.com (si-mbx2033.de.bosch.com [10.3.230.36]) by si0vm1949.rbesz01.com (Postfix) with ESMTPS id 47PYVp039Cz6CjZNX; Fri, 29 Nov 2019 13:20:18 +0100 (CET)
Received: from SI-MBX2033.de.bosch.com (10.3.230.36) by SI-MBX2033.de.bosch.com (10.3.230.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1847.3; Fri, 29 Nov 2019 13:20:17 +0100
Received: from SI-MBX2033.de.bosch.com ([fe80::e8d2:d090:af15:3320]) by SI-MBX2033.de.bosch.com ([fe80::e8d2:d090:af15:3320%4]) with mapi id 15.01.1847.005; Fri, 29 Nov 2019 13:20:17 +0100
From: "Kraus Achim (INST/ECS4)" <Achim.Kraus@bosch-si.com>
To: Christer Holmberg <christer.holmberg=40ericsson.com@dmarc.ietf.org>
CC: "core@ietf.org" <core@ietf.org>, Carsten Bormann <cabo@tzi.org>
Thread-Topic: [core] Retransmission of non-confirmable response message upon receiving request message retranmission?
Thread-Index: AQHVppE/OetFI+DdS0KoPWGUqntDGKeh/YWAgAAS76A=
Date: Fri, 29 Nov 2019 12:20:17 +0000
Message-ID: <09a7f0f318dc4f45a3cdd7791b28ecdd@bosch-si.com>
References: <41889A1F-ACC3-458B-B57F-503A55D1D2A3@ericsson.com> <FB10E1B0-E52C-47F7-A0D9-87AE305E29F5@tzi.org>
In-Reply-To: <FB10E1B0-E52C-47F7-A0D9-87AE305E29F5@tzi.org>
Accept-Language: de-DE, en-US
Content-Language: de-DE
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.19.121.46]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Brightmail-Tracker: H4sIAAAAAAAAA22Tb0xbVRjGOfe29Lb0breXsb50YrTRZIjbGLpJKNs0fBhfdFsyY6Krrsgd rdKW9bYIRCOSoJZuEwmZ/Bkddu3Cn2FLhYF1wNaxiIDgpovMARvClo50jkCy1cWpt71l7Qe/ nLznec/vec95bi6B0w5CQegMZsZk0BQrEyUCSU5X2iaMnFNnTtiF2cP1M8LsmtZjouzBu278 ZTx/5PSvwnyn8y8s/7hDtxd/U5JbyBTrShnTlp0HJdrOsz685MyuMuvwEKpE0ztqkJgA6kXw NbZjNUhC0FQDBkcGukT8ZgBB5dFL0c1dBOdXHDi/OY/gSNCLhflEKgfqWi+KwvU6ajdUXT4V qXEqD1oWZ4ThOpkqhdEH7Yn8mQ/A460S8HUO/HRvKKILqGeh7+++CEtSKnjoHor401QJ+L4e jPiIOX25fQEP14hKA49nEudnycF7+4GQfw8FznO8DlQK3Jn/J6o/BZ8seblZBHc+Hdy+LTz6 NNTb5qJjZfBj44KgFsmb4lybYkRTHNEUR7QiQQdaz+oyS/WZWdte2r7ZVMCwFZlbN79r1HsR /9nIfjRx/5AfYQTyo20Epkwh1Vduquk1BcbCcq2G1b5jshQzrFJBfhy0qunkxzJrKdDrWFZn NPgRELhyHVnQckNNk4Wa8grGZOQxP9pACJRysojYc4CmijRm5n2GKWFMq10VQSiB/EYwp6Zl JqaIKTukKzavtpVpJEpISKDXx3fix2KE2I9eIKTc7F1SzoJkSzR6VlcUxVN5nF5VY+go2kPU 3mlx4MSFS3ZuHW5xOXBaYDAaGIWcdCdxXlSY0loMj2+jeIKcGuGCSYlrxBwX0TVEIGUyWR2G pdy/EbsHkJXh6GRRMQZluTiG6koF97wNwbnf6hCMn2jGoL+nGwOrdwaDNs9DDOru/SAAe4hb GgaqhTButwnhyvVmIQSWfhaC03ZSBKEzbSLon+oQweK/SwT0f/WZGKZuj4khMDsphlBwVgzT fdUSWOitSQLnl78nQWB8RAqh8ftS6F2xkuD9vpGENqtrDQRa29dC6ObZtRC0dVNwqu0L2SIX MsaFPHhsNhyyWWP+n5Cjaux1ikpUcTQjsHT1av3x1290LH94fWOSv3vs0909bzlflfdl6J7/ 81YPyvqoYac+T9WRU/bk3g2q2U2vPbq4vD14S/feH/MWTe8rB3dkNE+r1M/ks/i+a2P7v/0u 78Tb3qpJi+vRijnXXkq50js7J2S+fc4LtScPHJ78xfN55xuuw6MbL6dWpOeWKwWsVrP1OdzE av4DzI/777UEAAA=
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/QoQIZ7TiiOd9UfPc0pIYHHseDoE>
Subject: Re: [core] Retransmission of non-confirmable response message upon receiving request message retranmission?
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Nov 2019 12:20:23 -0000

Hi Christer,

(sorry I missed to answer the list, so retransmitting my e-mail):
 
from my experience as one of the Eclipse/Californium developer:

Section 4 is about transmission (CON, NON,ACK and RST), and only slight refer to section 5 (request/response). For that FMPOV it seems to be clear, that if a retransmission is detected, the receiver should do its best the send back the same answer, in your case the empty ACK. 
In my interpretation of Section 4.5 the intention is, that the retransmission should be handled best on the transmission layer and should not be visible/forwarded to the request/response layer. That maybe relaxed, if the outcome is the same or shows only acceptable difference. Generally, the messages (flight) of the original answer are intended to be retransmitted.

Section 5 is then about the request/response 5.2.2, page 34 (top), "If a retransmitted request is received (perhaps because the original Acknowledgement was delayed), another Empty Acknowledgement is sent, and any response MUST be sent as a separate response."
That seem to point to the same intention: retransmit the original messages (flight) as answer.

(It seems that my understanding differs from Carsten's answer.)

Q1. "Perhaps I have missed it" => I think page 34 top specifies that.
 
Q2: That's the responsibility of the application to choose the right tradeoff between resources consumption and complying to the expectations.
If the difference is larger, your application must be designed for that. 

Mit freundlichen Grüßen / Best regards 

Achim Kraus

Mit freundlichen Grüßen / Best regards

Achim Kraus

Engineering Cloud Services 4 Bosch IoT Hub (INST/ECS4) 
Tel. +49 711 811-58139 | Fax +49 711 811-58200 | achim.kraus@bosch-si.com


-----Ursprüngliche Nachricht-----
Von: core <core-bounces@ietf.org> Im Auftrag von Carsten Bormann
Gesendet: Freitag, 29. November 2019 13:08
An: Christer Holmberg <christer.holmberg=40ericsson.com@dmarc.ietf.org>
Cc: core@ietf.org
Betreff: Re: [core] Retransmission of non-confirmable response message upon receiving request message retranmission?

Hi Christer,

> On Nov 29, 2019, at 09:44, Christer Holmberg <christer.holmberg=40ericsson.com@dmarc.ietf.org> wrote:
> 
> Hi,
>  
> A couple of questions for clarification.
>  
>  
> Assume a CoAP server receives a confirmable request message.
>  
> According to Section 4.5. of RFC 7252, the server SHOULD retransmit the associated ACK whenever it receives a retransmission of the request message. So far, so good.
>  
> Then, assume that the sever sends a non-confirmable response message to the request. AFAIK, that is allowed.

Allowed, yes, but also a rather unusual case: The client took care to send a confirmable request, and the server only answers unreliably.  This combination makes the most sense for an observe-GET, where the server is sending periodic notifications, so the loss of a single one is not really a big problem.


> ---
>  
> Q1:
>  
> Perhaps I have missed it, I can’t find any text saying that the server would retransmit the response message if it receives a retransmission of the request. 

No, it won’t.  The client will retransmit only up to receiving an ACK.
Since your scenario assumes non-confirmable responses, this implies a separate response, so the ACK will be empty.  The server can then send, at leisure, its response; no further retranmissions will take place.

(A weird case is where all ACKs get lost and finally the response indicates to the client that the request must have arrived, stopping retransmission — see penultimate paragraph of 4.2.  Still, the message-id of all retransmissions is the same, so no additional response will be generated.)

> Section 4.3 does say that a server may choose to transmit multiple copies of a non-confirmable message, but there is no text saying that such transmits would be triggered by a retransmission of the request.

That is indeed not intended.  Retransmissions happen at the message layer.  Request/response is a layer above and is not concerned with retransmissions.
 
> Section 4.5. does say:
>  
>      “A server might relax the requirement to answer all retransmissions
>       of an idempotent request with the same response (Section 4.2),”

Now you are back to piggybacked responses.
 
> Where does Section 4.2 talk about answering retransmissions of an idempotent request (or any request, for that matter) with the same response?

Good question.  Interesting.
 
> ---
>  
> Q2:
>  
> Related to Q1, Section 4.5 says:
>  
>       ”For example, an implementation might want to process duplicate
>       transmissions of a GET, PUT, or DELETE request as separate
>       requests if the effort incurred by duplicate processing is less
>       expensive than keeping track of previous responses would be.”
>  
>  
> Maybe I misunderstand this “process as separate requests” thing, but:
>  
> First, it means that each response could be different from the previous one, and the sender of the request would have to process each of them.

The sender is not supposed to retransmit a request if it already received a response.
Of course, the retransmission and the response might cross; in this case the superfluous response is not used.
 
> Second, does this mean that, if the responses are confirmable, the server should expect an ACK for each response? “Process as separate requests” makes it sound like that.

If the response is sent as a confirmable message, the server expects an ACK for it.  It retransmits until it gets one.
If the response is in an ACK, it is not confirmable; this is really the useful case for “process as separate requests”.

Grüße, Carsten

_______________________________________________
core mailing list
core@ietf.org
https://www.ietf.org/mailman/listinfo/core