[Specifications] Use of Hydra collections for W3C WoT Discovery (#236)

wiresio has just created a new issue for https://github.com/HydraCG/Specifications:

== Use of Hydra collections for W3C WoT Discovery ==
I'm reaching out to you from the W3C WoT Discovery TF since we have a special issue there.

## Describe your API requirement

In https://w3c.github.io/wot-discovery/#exploration-directory-api-registration-listing we are describing an API where all WoT Thing Descriptions (TD) can be downloaded from a so-called Thing Description Directory (TDD). TDs describe the interface towards specific devices or services and are defined as JSON-LD documents. The TDD is responsible to store and make them available for other devices or services interested in "consuming" these resources.

Since a TDD might store a large number of TDs, it is not appropriate to "dump" all of the TDs in one flush but rather offer some form of pagination such that the clients have a chance to receive all of them.

## Solution(s)

Currently the spec. features two methods for pagination very specific for http (1.1): "Chunked transfer encoding" and "header based pagination". Since I got a quite reserved response from developers using these methods, I'm interested in designing an "envelope based" pagination response as an alternative similar to as it is described in your spec: https://www.hydra-cg.com/spec/latest/core/#collections   

The special issue that we have, is that the objects in the "members" array are JSON-LD documents having individual contexts other than the context of the envelope. Due to the expertise that we have in our TF this will yield to implications once it comes to transfer to (RDF) triples. IMHO I would consider the envelope as format that is just needed "on the wire" to send server side information like pagination info along with the actual data and that clients could directly access the "members" array and then do the RDF processing.

## Question

What is your take on this? Have you ever come across such requirements? Would you know a good solution for the envelope approach?

Thanks!


Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/236 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 20 April 2021 08:56:47 UTC