Re: CBOR Tutorial

So be careful to not confuse the data model (aka manifests, bundles etc.) and then encoding (CBOR in this case).

CBOR, by itself, does not support random access.

However, a data model (such as the WebPack work) that is then encoded into CBOR can provide support for random access (or at least a limited set of it, based on the model).

So yes if we were to adopt WebPack, we would achieve a level of random access.  (NOTE: if we do “object” compression, we may have to do some work on the manifest).

Leonard

From: Romain <rdeltour@gmail.com>
Date: Thursday, February 1, 2018 at 2:18 PM
To: Leonard Rosenthol <lrosenth@adobe.com>
Cc: Laurent Le Meur <laurent.lemeur@edrlab.org>, Baldur Bjarnason <baldur@rebus.foundation>, Ivan Herman <ivan@w3.org>, "Schindler Wolfgang Dr." <w.schindler@pons.de>, "Davis, Greg" <greg.davis@pearson.com>, Ric Wright <rkwright@geofx.com>, W3C Publishing Working Group <public-publ-wg@w3.org>
Subject: Re: CBOR Tutorial


On 31 Jan 2018, at 17:58, Leonard Rosenthol <lrosenth@adobe.com<mailto:lrosenth@adobe.com>> wrote:

CBOR is a great exchange format for “over the wire” data exchange.   It is not a good format for “off the web” exchange (IMO)


Primarily because its optimized for streaming and not random access.

Random access is always a better model for data processing but assumes that you have all the data already present (as would you “off the web”).  However, when streaming across a network/the web, you don’t always have the option (yes, there is byte range requests but they aren’t supported in all modern network configs, eg. load balancers).

My understanding is that random access depends on the actual data model being encoded in CBOR?

If I understand correctly, in the bundling spec, the index can be parsed first, and gives you pointers to each individual request/response pair, which effectively enables random access.
Random access is btw stated as an essential requirement for the packaging spec: https://tools.ietf.org/html/draft-yasskin-webpackage-use-cases-00#section-3.1.5<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Fdraft-yasskin-webpackage-use-cases-00%23section-3.1.5&data=02%7C01%7Clrosenth%40adobe.com%7Cd327d8c0b59840ef04a908d56950983d%7C71f1da39c0a84d5a8d88a67b23c30bf4%7C0%7C0%7C636530717246387501&sdata=1NyJIIdxm%2FW0M8JbNVCixug9iLGWd7GgCT2G9LdOnuo%3D&reserved=0>

Am I missing something?

Romain.

Received on Thursday, 1 February 2018 10:22:45 UTC