[core] Message correlation with observe

Jim Schaad <ietf@augustcellars.com> Mon, 17 August 2020 15:39 UTC

Return-Path: <ietf@augustcellars.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 A8B333A119E for <core@ietfa.amsl.com>; Mon, 17 Aug 2020 08:39:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 QarOQP5pO-Pj for <core@ietfa.amsl.com>; Mon, 17 Aug 2020 08:39:51 -0700 (PDT)
Received: from mail2.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F41463A0CCD for <core@ietf.org>; Mon, 17 Aug 2020 08:39:50 -0700 (PDT)
Received: from Jude (73.180.8.170) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 17 Aug 2020 08:39:37 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: 'Klaus Hartke' <klaus.hartke@ericsson.com>, 'Carsten Bormann' <cabocabo@gmail.com>
CC: 'Core WG mailing list' <core@ietf.org>
Date: Mon, 17 Aug 2020 08:39:36 -0700
Message-ID: <013401d674ac$9e3504c0$da9f0e40$@augustcellars.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AdZ0p1+Tj1q6rV/TRxOxlQ+TE3N4mA==
Content-Language: en-us
X-Originating-IP: [73.180.8.170]
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/BPFoMz5gCIEE15vv_pa7agmHyPo>
Subject: [core] Message correlation with observe
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: Mon, 17 Aug 2020 15:39:55 -0000

Klaus, Carsten,

I am trying to figure out if there is a problem in my head, and thus in my
code, or if it is in the design of the specs.

Start by setting up an observe operation:

C1:  GET /temperature  MID:10  Token: 0x4a Observe: 0
S1:  ACK 2.05 Content  MID:10 Token:0x4a Observe:12 Payload:22.9
S2: NON 2.05 Content MID:11 Token:0x4a Observe:44  Payload: 22.8

I now do a proactive cancel

C2: GET /temperature MID:15 Token:0x4a Observe:1

I now get two responses back

S3: NON 2.05 Content MID:99 Token:0x4a Observe:46 Payload: 22.2
S4: ACK 2.05 Content MID:15 Token:0x4a Payload: 22.1

As a human being, I automatically associate response S3 with request C1 and
response S4 with request C2.  However, my code base is associating response
S3 with request C2 and then drops response S4 on the floor because it is an
ACK to a message that has already received a response.  My code however is
doing something strange with the response S3 internally to deal with the
possibility of needing to refresh the observe relationship automatically
under the covers.

Other than playing with the use of the observe option in the response to
change the correlation algorithm, I believe that my code is correctly
following the spec and I just need to fix things about the refreshing in my
code.  The one odd side effect is that the client is not going to get a
response from the server that does not have an observe option in it, even if
the proactive cancel operation is a CON.  This seems to have cognitive
dissidence.   The observe relation is canceled, but there is no positive
notification of the fact.

I don't' believe that the use of OSCORE changes any thing in the above.  The
same thing is true for using a reliable transport since the MID is not
really used for correlation here, the token value is used here.

Is what my code does what the authors expected to occur?

Jim