Re: [core] Pub/Sub update to use the core multipart content format

Michael Koster <> Sun, 03 March 2019 12:54 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 3030C12D4EC for <>; Sun, 3 Mar 2019 04:54:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 6-NJSazgcXXQ for <>; Sun, 3 Mar 2019 04:54:02 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:4864:20::62d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id A659D1295D8 for <>; Sun, 3 Mar 2019 04:54:02 -0800 (PST)
Received: by with SMTP id c17so1189772plz.13 for <>; Sun, 03 Mar 2019 04:54:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/mfyR3+xGlD/hXR2C/cevEaYtuXy+F1OnAsdZChghcg=; b=YpsR8dpE/aFw5W2P/k/hQek3gZDn277CPsjWLFWictPhdqbWCA2Emwh5RwHDUY5IUb Z419uXtvYB5jFnBvbZePxcQ+ynbRmz2elfs6zVixi7VUAb2MPEIcZ1rFXsAehbv5C3uE B20MKzN0Viqf2ALJD4cpg52sG95xFpTIT+rFGDzEdBsXAUbYgMsakqL24o0cqcLw2b+3 iecrJQkPqY0NjwI/A7Kb9+2xQ9YzbLWN8zs7X7LiWQ9LRVjsFqrNtdSzoARUv/kKSKu2 ONLOA/ifmwRk1DNDsnvLhg9OecPKL5K0W1HxGqUxjrXgBbgVfCHmCSPbfuvYnndD9mfR qiQg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/mfyR3+xGlD/hXR2C/cevEaYtuXy+F1OnAsdZChghcg=; b=CtGcJ9W3JTC9YKwAx6k9NrrTmXGRBq2k2axHoWMu6e3ZkcHWnM2SWeEV9n7eYXGJjl l5Kf5lshvx7CXAecL6DC7FJfFJGrrl2AL2FICVjo8HalZvFaGthMT4UuSpin/fRFieYM Thvq7KlcWKykAS1fpX8lK/MbcozCSwTB9FNzQFcNDYfDkxncvlkpX1Z9Y3u+IYGiH0Yk 6C+dKd/FKb5EbMoOsQDXU6RDm5vu7wgCWrlD1lroFJbah1ugqsdcVMbYnEfQikz3TTT7 dYGNg/uVTTThTiy/VWchNLIqDU4JAf1L2mkhv+mfS8CAD94plkcwF4CY7JtuW7RI+OXb GmgQ==
X-Gm-Message-State: APjAAAW32sNHy65oBxhVvkiXCezu5SnPtLAFlit6vPwqJywao9cwP0jY rRsKHSRphMQQ5ghZrET8f0c=
X-Google-Smtp-Source: APXvYqwegO70YJ1e0CvS3p6okIt2mSYrFHPpgXW13jDv2MXObFg3K45g5qeAJHghhvZlH4zNmhM9Vg==
X-Received: by 2002:a17:902:34a:: with SMTP id 68mr14622064pld.327.1551617641492; Sun, 03 Mar 2019 04:54:01 -0800 (PST)
Received: from [] ( []) by with ESMTPSA id g12sm4400318pgr.76.2019. (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Mar 2019 04:54:00 -0800 (PST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Michael Koster <>
In-Reply-To: <006101d4d173$036f3150$0a4d93f0$>
Date: Sun, 3 Mar 2019 04:53:59 -0800
Cc: =?utf-8?Q?Ari_Ker=C3=A4nen?= <>, =?utf-8?Q?Jaime_Jim=C3=A9nez?= <>,
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <> <006101d4d173$036f3150$0a4d93f0$>
To: Jim Schaad <>
X-Mailer: Apple Mail (2.3273)
Archived-At: <>
Subject: Re: [core] Pub/Sub update to use the core multipart content format
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 03 Mar 2019 12:54:05 -0000

Hi Jim,

I am proposing to use the multipart response to indicate that there aren't data to be returned on a subscribe operation.

We were proposing a new response code, but there was a lot of pushback on doing this, so we want to try the multipart format with an empty array (cbor x08).

It does require that a pub/sub client learn a little cbor and be able to unpack the intended payload from the embedded string.

Would the new response code be a better option after all? It it easier to teach clients about a new 2.xx response than a new format?

Best regards,


> On Mar 2, 2019, at 7:41 PM, Jim Schaad <> wrote:
> Michael,
> When I was suggesting using multipart I was thinking more in term of
> publishing rather than retrieval.  It would allow for multiple formats to be
> sent to the pub/sub server which the server would not need to think about
> doing format conversion on but could still return only a single format.
> I don't think that one wants to do a multipart retrieval as a general rule
> unless the content really a multipart thing.  I guess that the server would
> need to be told which way to treat things, but that seems to be a reasonable
> query parameter for topic creation.
> Jim
>> -----Original Message-----
>> From: core <> On Behalf Of Michael Koster
>> Sent: Saturday, March 2, 2019 3:24 PM
>> To: Ari Keränen <>om>; Jaime Jiménez
>> <>
>> Cc: WG <>
>> Subject: Re: [core] Pub/Sub update to use the core multipart content
> format
>> OK, I read the multipart draft (expired?) For the no data case we will
> just
>> send an empty multipart payload (cbor x80).
>> It seems like every implementation of pub/sub will be required to support
>> only link-format and multipart. The subtype support will be on a topic
> basis
>> and maybe a broker should have some way to list a set of supported
>> subtopics that it can handle. To remind people, a coap pub/sub broker
>> doesn't have any notion of "resource state" other than a stored
>> representation.
>> Best regards,
>> Michael
>>> On Mar 2, 2019, at 5:27 AM, Michael Koster
>> <> wrote:
>>> Hi,
>>> I am editing the pub/sub draft today and thinking about the multipart
>> content format as a way to provide a subscribe or retrieve response for
> the
>> no data case.
>>> It seems to require that the pub/sub client always support the multipart
>> format, with no content being one of the format options signaled by
>> something like "maybe".
>>> Does this seem right to you also? Do we need to invent a new empty
>> format code instead of a response code?
>>> Best regards,
>>> Michael
>> _______________________________________________
>> core mailing list