Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Information model for interactions #116

Closed
mmccool opened this issue Feb 8, 2021 · 3 comments
Closed

Information model for interactions #116

mmccool opened this issue Feb 8, 2021 · 3 comments

Comments

@mmccool
Copy link
Contributor

mmccool commented Feb 8, 2021

When a complex response occurs, such as paginated results or query results, these have their own information model distinct from the core information model of the data stored in the directory. This impacts how the returned data is processed by the consumer, i.e. if we are returning JSON-LD, we probably want to treat nested TDs using their own context, and not include other bits like "next-page links" used only to manage the interaction.

To do: add separate section describing interactions, possibly including their own information models, and specify how RDF-based consumers of this information should operate.

@mmccool
Copy link
Contributor Author

mmccool commented Feb 8, 2021

See also w3c/wot-security#166 which lists several use cases for "variant TDs" being returned.

@mmccool
Copy link
Contributor Author

mmccool commented Mar 16, 2021

So this problem goes away if we use the protocol to do pagination...

@farshidtz
Copy link
Member

So this problem goes away if we use the protocol to do pagination...

If you are referring to HTTP's chunked transfer encoding (#117 (comment)), this requires loading of the entire collection before being able to parse the JSON array on the client side. The server may also need to construct the JSON manually. Unless we use something like JSON Lines (See #93) to make each TD an independant resource object. I think chunked transfer encoding goes hand-in-hand with RESTful pagination, i.e. if a page contains huge TDs, it will be transferred in chunks.

If you are referring to HTTP Range Requests, it can be used for both byte ranges or TDs. It is a good option, except that the ranges are given in request headers and not in the URL. We can extend it by adding query range arguments and next links and we will end up with what we are proposing in #130.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants