Subject: [6tsch] about format

From: Qin Wang <[email-masked]>
Date: Tue, 13 Aug 2013 01:39:35 +0800

Hi Pascal,

During the teleconference on last Friday, you mentioned that we will
investigate Binary JSON to define the message formats. I'm not very clear
about what is the relationship between the Binary JSON coding and 802.15.4e
Information Element. I guess that we will still use IEs to carry the 6top
messages, but for those IE coding, we will use Binary JSON. Correct?

By the way, what is the advantage to use Binary JSON format? What are your
main considerations?

Thanks
Qin

---

From: Xavier Vilajosana Guillen <[email-masked]>
Date: Mon, 12 Aug 2013 10:46:59 -0700

Hi Qin,

my feeling is that BSON will go in the packet from the PCE to the mote that
has to be scheduled. This is a higher layer issue and relates to the
payload of a CoAP packet sent from the PCE to the mote (and viceversa). I
don't think that 6top needs BSON as an encoding for the IEs.

does it make sense?
X

On Mon, Aug 12, 2013 at 10:39 AM, Qin Wang <[email-masked]> wrote:

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

---

From: Qin Wang <[email-masked]>
Date: Tue, 13 Aug 2013 01:56:33 +0800

Xavi,

It make more sense to use BSON in higher layer message definition.

But if so, why it should be included in the document "Timeslot management
methods and format" ? My understanding is the document is about 6top, so
the format in the document refers to the format of 6top packets. Please
point out where I'm wrong.

Thanks
Qin

On Tue, Aug 13, 2013 at 1:46 AM, Xavier Vilajosana Guillen <
[email-masked]> wrote:

> Hi Qin,
>
> my feeling is that BSON will go in the packet from the PCE to the mote
> that has to be scheduled. This is a higher layer issue and relates to the
>> By the way, what is the advantage to use Binary JSON format? What are
>> your main considerations?
>>
>> Thanks
>> Qin
>>

---

From: Xavier Vilajosana Guillen <[email-masked]>
Date: Mon, 12 Aug 2013 11:02:31 -0700

Hi Qin,

I think that the work item aims to define the packet format of the messages
that will transport the schedule information, this is on top of 6top. 6top
has the API to handle that information and use its own messages (using its
IEs) to install the schedule in both sides of a link (if there is
connectivity between the two nodes).

X

---

From: "Raghuram Sudhaakar (rsudhaak)" <[email-masked]>
Date: Mon, 12 Aug 2013 19:39:48 +0000

Qin,
There is an advantage of using BSON over regular JSON for the purpose of transporting schedule information. Most of this info is bitmaps, and BSON capability to handle binary payload will be efficient compared to regular JSON. If we define the formats as regular BSON as opposed to custom formats, the implementation of 6top in various languages will also be easier as BSON libraries are readily available.

From: Xavier Vilajosana Guillen <[email-masked]<mailto:[email-masked]>>
Reply-To: <[email-masked]<mailto:[email-masked]>>
Date: Monday, August 12, 2013 11:02 AM
To: Qin Wang <[email-masked]<mailto:[email-masked]>>
Cc: "[email-masked]<mailto:[email-masked]>" <[email-masked]<mailto:[email-masked]>>
Subject: Re: [6tsch] about format

Hi Qin,

I think that the work item aims to define the packet format of the messages that will transport the schedule information, this is on top of 6top. 6top has the API to handle that information and use its own messages (using its IEs) to install the schedule in both sides of a link (if there is connectivity between the two nodes).

X

On Mon, Aug 12, 2013 at 10:56 AM, Qin Wang <[email-masked]<mailto:[email-masked]>> wrote:
Xavi,

But if so, why it should be included in the document "Timeslot management methods and format" ? My understanding is the document is about 6top, so the format in the document refers to the format of 6top packets. Please point out where I'm wrong.

Thanks
Qin

On Tue, Aug 13, 2013 at 1:46 AM, Xavier Vilajosana Guillen <[email-masked]<mailto:[email-masked]>> wrote:
Hi Qin,

my feeling is that BSON will go in the packet from the PCE to the mote that has to be scheduled. This is a higher layer issue and relates to the payload of a CoAP packet sent from the PCE to the mote (and viceversa). I don't think that 6top needs BSON as an encoding for the IEs.

does it make sense?
X

On Mon, Aug 12, 2013 at 10:39 AM, Qin Wang <[email-masked]<mailto:[email-masked]>> wrote:
Hi Pascal,

During the teleconference on last Friday, you mentioned that we will investigate Binary JSON to define the message formats. I'm not very clear about what is the relationship between the Binary JSON coding and 802.15.4e Information Element. I guess that we will still use IEs to carry the 6top messages, but for those IE coding, we will use Binary JSON. Correct?

By the way, what is the advantage to use Binary JSON format? What are your main considerations?

Thanks
Qin

_______________________________________________
6tsch mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/6tsch

---

From: Qin Wang <[email-masked]>
Date: Tue, 13 Aug 2013 05:23:42 +0800

Hi Xavi and Raghuram,

Now I can see the advantage of BSON.

Regarding to the scope of "Timeslot Management Methods and Formats", and
the relationship between task item-1 and item-2, now my understanding is as
follows.

(1) item-2 is about 6top. In the first step, it is a subset of 6top, only
includes the commands and packets/IEs used for static case, i.e. Enhanced
Beacon based schedule establishment. It still use custom format and 15.4e
IE to carry.

(2) item-1 is about the management messages carried by upper layer
protocols like CoAP to use 6top. It is still a open issue to use BSON or
custom format to define the management messages.

Correct?

Thanks
Qin

On Tue, Aug 13, 2013 at 3:39 AM, Raghuram Sudhaakar (rsudhaak) <
[email-masked]> wrote:

>  Qin,
> There is an advantage of using BSON over regular JSON for the purpose of
> transporting schedule information. Most of this info is bitmaps, and BSON
> capability to handle binary payload will be efficient compared to regular
> JSON. If we define the formats as regular BSON as opposed to custom
> formats, the implementation of 6top in various languages will also be
> easier as BSON libraries are readily available.
>
>   From: Xavier Vilajosana Guillen <[email-masked]>
> Reply-To: <[email-masked]>
> To: Qin Wang <[email-masked]>
> Cc: "[email-masked]" <[email-masked]>
>  I think that the work item aims to define the packet format of the
> messages that will transport the schedule information, this is on top of
> 6top. 6top has the API to handle that information and use its own messages
> (using its IEs) to install the schedule in both sides of a link (if there
> is connectivity between the two nodes).
>
>  X
>
>
>>  But if so, why it should be included in the document "Timeslot
>> management methods and format" ? My understanding is the document is about
>> 6top, so the format in the document refers to the format of 6top packets.
>> Please point out where I'm wrong.
>>
>>  Thanks
>>  Qin
>>
>>
>>>  On Mon, Aug 12, 2013 at 10:39 AM, Qin Wang <[email-masked]>wrote:
>>>
>>>>  Hi Pascal,
>>>>

---

From: Xavier Vilajosana Guillen <[email-masked]>
Date: Mon, 12 Aug 2013 14:38:39 -0700

Hi Qin,

this sounds correct to me.
X

---

From: Thomas Watteyne <[email-masked]>
Date: Tue, 13 Aug 2013 00:03:43 -0700

+1.

Please note that the goal of item 1 is to define the format of the payload,
not per se the transport method.

Thomas

On Mon, Aug 12, 2013 at 2:38 PM, Xavier Vilajosana Guillen <
[email-masked]> wrote:

>>>>>  my feeling is that BSON will go in the packet from the PCE to the
>>>>> mote that has to be scheduled. This is a higher layer issue and relates to
>>>>> the payload of a CoAP packet sent from the PCE to the mote (and viceversa).
>>>>> I don't think that 6top needs BSON as an encoding for the IEs.
>>>>>
>>>>>  does it make sense?
>>>>> X
>>>>>
>>>>>
>>>>>>  During the teleconference on last Friday, you mentioned that we
>>>>>> will investigate Binary JSON to define the message formats. I'm not very
>>>>>> clear about what is the relationship between the Binary JSON coding and
>>>>>> 802.15.4e Information Element. I guess that we will still use IEs to carry
>>>>>> the 6top messages, but for those IE coding, we will use Binary JSON.
>>>>>> Correct?
>>>>>>

---

From: Qin Wang <[email-masked]>
Date: Wed, 14 Aug 2013 08:14:38 +0800

Hi All,

I'm trying to apply BSON to express data type encountered in 6top and
 802.15.4e. I'm not sure if ASN will be included in some management
messages or not. But, if needed, how to express uint40 (5bytes integer)
with BSON?

Thanks
Qin

On Tue, Aug 13, 2013 at 3:03 PM, Thomas Watteyne <[email-masked]
> wrote:

> +1.
>
> Please note that the goal of item 1 is to define the format of the
> payload, not per se the transport method.
>
> Thomas
>
>
>>> (1) item-2 is about 6top. In the first step, it is a subset of 6top,
>>> only includes the commands and packets/IEs used for static case, i.e.
>>> Enhanced Beacon based schedule establishment. It still use custom format
>>> and 15.4e IE to carry.
>>>
>>>> There is an advantage of using BSON over regular JSON for the purpose
>>>> of transporting schedule information. Most of this info is bitmaps, and
>>>> BSON capability to handle binary payload will be efficient compared to
>>>> regular JSON. If we define the formats as regular BSON as opposed to custom
>>>> On Mon, Aug 12, 2013 at 10:56 AM, Qin Wang <[email-masked]>wrote:
>>>>
>>>>> Xavi,
>>>>>

---

From: Thomas Watteyne <[email-masked]>
Date: Tue, 13 Aug 2013 18:07:08 -0700

I see two options (although I'm not a BSON expert!!):

   - An array of 5 bytes:
   {"ASN": [0x01,0x02,0x03,0x04,0x05]}
   - An "opaque" binary value (\x05 element type)?
   {"ASN": 0x0102030405}

Running through the encoding of both, it looks like the second option
yields much smaller code.

That being said, it would be interesting to see how small you will be able
to get the representation. The first question at http://bsonspec.org/#/faq is
not very encouraging.

Thomas

PS: have you come across an easy way to convert JSON into BSON? Some
website where you can copy-paste some JSON would be wonderful...

On Tue, Aug 13, 2013 at 5:14 PM, Qin Wang <[email-masked]> wrote:

> On Tue, Aug 13, 2013 at 3:03 PM, Thomas Watteyne <
> [email-masked]> wrote:
>
>> +1.
>>
>>>> Regarding to the scope of "Timeslot Management Methods and Formats",
>>>> and the relationship between task item-1 and item-2, now my understanding
>>>> is as follows.
>>>>