Subject: Re: [core] draft-ietf-core-multipart-ct

From: Michael Koster <[email-masked]>
Date: Sat, 2 Mar 2019 14:05:35 -0800

Hi,

I am integrating multipart into pub/sub as a way to signal empty payloads that might result from a subscribe operation where their aren't any stored data (stale or non-retaining topic) or a retrieve in the same case.

We have decided initially not to support multiple content formats on a topic in pub/sub,where the proker would have to convert, but now it might be a little easier with multipart, if we build in a subtyping system as per Jim's email. 

IMO the subtype target attribute at least will be necessary for the kind of discovery we want to support in pub/sub. I guess subtype accept header option is going to be needed also, so a pub/sub client can indicate it accepts emty payload format and e.g. senml.

In general I think this can work for the pub/sub use case and will write it in if it makes sense.

Best regards,

Michael

> On Feb 19, 2019, at 9:48 PM, Jim Schaad <[email-masked]> wrote:
> 
> I did think about some of this when I put up the proposal.
>  
> For case (A), unless it is going to have options while doing a rigidly structured response, there is no need to have a value different than Accept 62.  In fact if there is really only one structured response, then there is not a need to have any accept option in the request at all.
>  
> For case (B), I thought about the recursive case and that is why I put the SHOULD and talked about options between multiple things while building the response.  I don’t think that there are going to be enough cases of a tree structure being returned that anything needs to be said about it one way or the other.  If that type of detail is really needed then I would expect that a GET would be replaced by a POST with the details of the response needed in the content of the POST.
>  
> In the semantics, I wanted to provide a minimal amount of information.  Thus the language about using it to provide guidance for specific pairs of content types that can go into a specific location.  The other place that I was thinking it might be useful would be in the case of a PUB-SUB server returning multiple content types where the set of equivalents might be restricted to the requested values rather than returning all possibilities.
>  
> Jim
>  
>  
> From: Thomas Fossati <[email-masked]> 
> Sent: Tuesday, February 19, 2019 1:58 AM
> To: Jim Schaad <[email-masked]>
> Cc: Klaus Hartke <[email-masked]>; [email-masked]; [email-masked]
> Subject: Re: [core] draft-ietf-core-multipart-ct
>  
> It has surfaced in the mailing list as well as in private exchanges that there are two ways of looking at multipart-ct:
> (A) as a mechanism to wrap multiple related things in a rigidly structured way;
> (B) as a mechanism to aggregate related thingsin flexible ways (e.g., the EST-coaps credentials).
> 
> One approach to content negotiation for multiparts of kind (A) is to assign the aggregate a separate type altogether (overriding C-F 62 with something allocated on purpose from the FCFS portion of the codepoint space).  This fits Accept’s semantics well.
> 
> Content negotiation with multiparts of kind (B) needs something like Jim’s proposal.  The slight complication that potentially breaks Jim’s approach is recursion.
> 
> To support this, I think the draft could say:
> - multiparts of kind (A) SHOULD override the multipart C-F with their own; and
> - multiparts of kind (B) MUST not include other multiparts of the same “kind”.
> 
> The above would make a recursive multipart (i.e., a 62 embedded in another 62) illegal and give Jim’s new content negotiation a well-defined semantics.
> 
> Cheers
> 
> On Sat, Feb 16, 2019 at 6:25 PM Jim Schaad <[email-masked] <mailto:[email-masked]>> wrote:
> >
> > Looking at this, it does seem to be a strange way to deal with things.  Of course the problem is made even more of a pain if you think about the possibility of having nested multipart contents.
> >
> > While the following does may not be the greatest solution, I think that it might be a better answer:
> >
> > 1.  Define a new target attribute:  "mt-subtypes" which contains the list of any content type which can be returned in a multipart content.  This could be at the top level or anyplace in a tree.
> >
> > 2.  Define a new option: "mt-accept" which contains the list of sub-content types that the client can deal with.  This option would be defined as advisory on the part of the server, that is it can return content types which are not in the list, but where options exist in the possible returned content tree the requested types, in order, SHOULD be the ones chosen by the server.   I would propose the option be "Non-Critical, Safe, CacheKey, Repeatable".
> >
> > I am not sure if I believe that the new option is part of the cache key or not.  I can see arguments on both sides, but I think I come down to yes.
> >
> > Carsten,   I think that this issue (but maybe not this solution) needs to be put onto the agenda for the interim meeting next Wed.
> >
> > Jim
> >
> >
> > > -----Original Message-----
> > > From: Klaus Hartke <[email-masked] <mailto:[email-masked]>>
> > > Sent: Tuesday, February 12, 2019 9:50 AM
> > > To: Jim Schaad <[email-masked] <mailto:[email-masked]>>
> > > Cc: [email-masked] <mailto:[email-masked]>; [email-masked] <mailto:[email-masked]> WG <[email-masked] <mailto:[email-masked]>>
> > > Subject: Re: [core] draft-ietf-core-multipart-ct
> > >
> > > For context: [1] [2]
> > >
> > > Jim Schaad wrote:
> > > > If you say ACCEPT 62, do you accept any combination of nested content
> > > types?
> > >
> > > Yes. A CoAP request can include at most one Accept option and any response
> > > must exactly that value as Content-Format or be an error response. CoAP
> > > doesn't have a mechanism for negotiating the content formats of
> > > representations embedded in other representations. I stumbled upon the
> > > same problem with CoRAL.
> > >
> > > > Should something about this be placed into the draft?
> > >
> > > Yes. Proposed text: "CoAP doesn't have a mechanism for negotiating the
> > > content formats of representations embedded in application/multipart-core
> > > representations."
> > >
> > > > Also I note that this draft is currently expired and needs to be reposted.
> > >
> > > Yes. Soon™.
> > >
> > > Klaus
> > >
> > > [1]
> > > https://mailarchive.ietf.org/arch/msg/ace/L1QPw1zHAj15nsKMe8AFDu6dcm <https://mailarchive.ietf.org/arch/msg/ace/L1QPw1zHAj15nsKMe8AFDu6dcm>
> > > I
> > > [2] https://mailarchive.ietf.org/arch/msg/ace/vj5CYF8eRrra5yph2Z9ui3Gkllk <https://mailarchive.ietf.org/arch/msg/ace/vj5CYF8eRrra5yph2Z9ui3Gkllk>
> >
> > _______________________________________________
> > core mailing list
> > [email-masked] <mailto:[email-masked]>
> > https://www.ietf.org/mailman/listinfo/core <https://www.ietf.org/mailman/listinfo/core>
> 
> -- 
> Thomas
> _______________________________________________
> core mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/core

---

From: Michael Koster <[email-masked]>
Date: Sat, 2 Mar 2019 14:14:24 -0800

To follow on a little, the pub/sub use case is for a variable format response (case C?) that is a better alternative than adding a new result code (2.xx) for "no data".

There is another use case (like case B) which is for a generalized hypermedia format that can return links, data, or both depending on the client workflow. This would eliminate the need for a new content format like HSML, and would allow arbitrary data formats to be associated with core-link-format in batch-access collections as per CoRE Interfaces.

Best regards,

Michael

> On Mar 2, 2019, at 2:05 PM, Michael Koster <[email-masked]> wrote:
> 
> Hi,
> 
>> On Feb 19, 2019, at 9:48 PM, Jim Schaad <[email-masked] <mailto:[email-masked]>> wrote:
>> 
>> From: Thomas Fossati <[email-masked] <mailto:[email-masked]>> 
>> Cc: Klaus Hartke <[email-masked] <mailto:[email-masked]>>; [email-masked] <mailto:[email-masked]>; [email-masked] <mailto:[email-masked]>

---

From: Michael Koster <[email-masked]>
Date: Sat, 2 Mar 2019 15:12:58 -0800

OK so if there's no data I send an empty multipart - (cbor x80)

Sorry, I'm just getting up to speed. Is the latest draft version -02? 

Michael

> On Mar 2, 2019, at 2:14 PM, Michael Koster <[email-masked]> wrote:
> 
>> On Mar 2, 2019, at 2:05 PM, Michael Koster <[email-masked] <mailto:[email-masked]>> wrote:
>> 
>> Hi,
>>

---

From: Jim Schaad <[email-masked]>
Date: Sat, 2 Mar 2019 15:23:41 -0800

That would not work if one put in an ACCEPT XX which was not multipart.  Although in that case you could return a content request not available.

Jim

From: Michael Koster <[email-masked]> 
Sent: Saturday, March 2, 2019 3:13 PM
To: Jim Schaad <[email-masked]>
Cc: Thomas Fossati <[email-masked]>; [email-masked]; [email-masked] WG <[email-masked]>; Klaus Hartke <[email-masked]>; Jaime Jiménez <[email-masked]>; Ari Keränen <[email-masked]>
Subject: Re: [core] draft-ietf-core-multipart-ct

Michael

On Mar 2, 2019, at 2:14 PM, Michael Koster <[email-masked] <mailto:[email-masked]> > wrote:

Best regards,

Michael

On Mar 2, 2019, at 2:05 PM, Michael Koster <[email-masked] <mailto:[email-masked]> > wrote:

Hi,

Best regards,

Michael

On Feb 19, 2019, at 9:48 PM, Jim Schaad <[email-masked] <mailto:[email-masked]> > wrote:

Jim

From: Thomas Fossati <[email-masked] <mailto:[email-masked]> > 
Sent: Tuesday, February 19, 2019 1:58 AM
To: Jim Schaad <[email-masked] <mailto:[email-masked]> >
Cc: Klaus Hartke <[email-masked] <mailto:[email-masked]> >; [email-masked] <mailto:[email-masked]> ; [email-masked] <mailto:[email-masked]> 
Subject: Re: [core] draft-ietf-core-multipart-ct

Cheers

On Sat, Feb 16, 2019 at 6:25 PM Jim Schaad < <mailto:[email-masked]> [email-masked]> wrote:
> > From: Klaus Hartke < <mailto:[email-masked]> [email-masked]>
> > To: Jim Schaad < <mailto:[email-masked]> [email-masked]>
> > Cc:  <mailto:[email-masked]> [email-masked];  <mailto:[email-masked]> [email-masked] WG < <mailto:[email-masked]> [email-masked]>
> >  <https://mailarchive.ietf.org/arch/msg/ace/L1QPw1zHAj15nsKMe8AFDu6dcm> https://mailarchive.ietf.org/arch/msg/ace/L1QPw1zHAj15nsKMe8AFDu6dcm
> > I
> > [2]  <https://mailarchive.ietf.org/arch/msg/ace/vj5CYF8eRrra5yph2Z9ui3Gkllk> https://mailarchive.ietf.org/arch/msg/ace/vj5CYF8eRrra5yph2Z9ui3Gkllk
>
>  <mailto:[email-masked]> [email-masked]
>  <https://www.ietf.org/mailman/listinfo/core> https://www.ietf.org/mailman/listinfo/core

-- 
Thomas

---

From: Michael Koster <[email-masked]>
Date: Sat, 2 Mar 2019 15:26:13 -0800

Agree, the accept option would be for multipart, which illustrates why we would need a new option for accept subtype.

It follows the use case example in 3.1 of the draft.

Michael

> On Mar 2, 2019, at 3:23 PM, Jim Schaad <[email-masked]> wrote:
> 
>> On Mar 2, 2019, at 2:14 PM, Michael Koster <[email-masked] <mailto:[email-masked]>> wrote:
>>

---

From: Carsten Bormann <[email-masked]>
Date: Sun, 3 Mar 2019 02:24:15 +0100

On Mar 3, 2019, at 00:26, Michael Koster <[email-masked]> wrote:
> 
> Agree, the accept option would be for multipart,

Right.

> which illustrates why we would need a new option for accept subtype.

So that we know what we are talking about, I made a proposal in the slides for the last interim (2019-02-20): Accept-Embedded Option.
But I’m not yet convinced that we actually need that…

> It follows the use case example in 3.1 of the draft.

Right.

But I don’t understand why you want an accept for embedded media types here.
Why would I subscribe to a topic and then not take the data?
Obviously, the kinds of data sent on a topic need to be part of the (metadata) definition of the topic…

Grüße, Carsten

>>>>> On Sat, Feb 16, 2019 at 6:25 PM Jim Schaad <[email-masked]> wrote:
>>>>> >
>>>>> > > From: Klaus Hartke <[email-masked]>
>>>>> > > Cc: [email-masked]; [email-masked] WG <[email-masked]>
>>>>> > > https://mailarchive.ietf.org/arch/msg/ace/L1QPw1zHAj15nsKMe8AFDu6dcm
>>>>> > > I
>>>>> > > [2] https://mailarchive.ietf.org/arch/msg/ace/vj5CYF8eRrra5yph2Z9ui3Gkllk
>>>>> >