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

Efficient formats for TD #885

Open
takuki opened this issue Mar 13, 2020 · 5 comments
Open

Efficient formats for TD #885

takuki opened this issue Mar 13, 2020 · 5 comments
Labels
Defer to TD 2.0 Discovery Relates to how to retrieve TDs and Discovery TF work Has Use Case Potential The use case can be extracted and explained Optimization Topics related to optimize the TD (e.g. format, content) Relevance Unclear Issue has a use case but it is not relevant to the scope of the charter

Comments

@takuki
Copy link
Contributor

takuki commented Mar 13, 2020

For example, WebAssembly uses LLVM which is a platform-independent intermediate code as the efficient format. It is likely the case that EXI or CBOR does not help WebAssembly a lot.

Similarly. when we think about "Efficient format" for TD, I think we need to step back and think about one or two plausible use cases, and any possible approaches to efficient format should cater to the use cases.

There are also consideration of levels.
There are multiple levels from bytes, syntax (token/grammar), data model, information model.

  • The byte level is deflate, gzip, etc. They detect redundancy at byte level, and compress them.
  • The syntax level is EXI4JSON, CBOR, etc. They work at the token level according to JSON grammar.
  • The data model level is RDF Binary Thrift, HDT, etc. They work at the triplet level according to RDF grammar.
  • The information model level works on TD information model described in TD specification.

The higher in the levels, it is more useful for the processing at the high layer because the information is exchanged at the high level directly without going through the lower level processing. However, such a format is not useful for software expecting lower level processing. For example, WoT client that processes TD as pure JSON may not be able to process TDs encoded at RDF level.

Therefore, I suggest we start looking at the use case(s) first.

@sebastiankb sebastiankb added the Optimization Topics related to optimize the TD (e.g. format, content) label Mar 16, 2020
@danielpeintner
Copy link
Contributor

I would like to add a structure based on the devices and/or use-cases pointing to the aforementioned levels.

Why an efficient TD format might make sense:

  • powerful devices may want to get large TDs in compressed form (-> byte level)

    • faster download
    • can be achieved by deflate/gzip as done today in Web
  • thing with limited resources may prefer compact form (-> syntax level)

    • to hold TD data
    • to receive TDs it interacts with

@takuki
Copy link
Contributor Author

takuki commented Mar 30, 2020

* thing with limited resources may prefer compact form (-> syntax level)
  
  * to hold TD data
  * to receive TDs it interacts with

SensorML may give us some insights into issues related to Things with limited resources. In particular, it has an encoding examples for EXI and CBOR.

@takuki
Copy link
Contributor Author

takuki commented Apr 1, 2020

In March 27th TD telecon (minutes here):

  • @sebastiankb indicated there is some use cases for efficient TD encoding in eCl@ss discussion.
  • @egekorkan wanted to make clear what kind of constrained devices we are talking about here.

@Citrullin
Copy link
Member

Citrullin commented May 19, 2020

Not sure how the W3C working groups operates. Just to give you some insights for constrained devices. I contribute to RIOT OS. We mostly use CBOR for efficient and flexible data exchange. Zephyr OS also uses cbor. Same goes for Amazon FreeRTOS. They all don't have an integration for EXI. Never heard about a use-case with EXI or EXI4JSON. Either it is CBOR or JSON.
Due to the nature of lossy networks, such as 6LoWPAN with RPL, CBOR makes more sense for constrained devices.

@sebastiankb
Copy link
Contributor

defer this topic to TD 2.0

@egekorkan egekorkan added Selected for Use Case The issue is relevant for the work and should move to an use case Relevance Unclear Issue has a use case but it is not relevant to the scope of the charter Discovery Relates to how to retrieve TDs and Discovery TF work Has Use Case Potential The use case can be extracted and explained and removed Selected for Use Case The issue is relevant for the work and should move to an use case labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defer to TD 2.0 Discovery Relates to how to retrieve TDs and Discovery TF work Has Use Case Potential The use case can be extracted and explained Optimization Topics related to optimize the TD (e.g. format, content) Relevance Unclear Issue has a use case but it is not relevant to the scope of the charter
Projects
None yet
Development

No branches or pull requests

5 participants