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

feat(core): add semantic composed thing #1174

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danielpeintner
Copy link
Member

@danielpeintner danielpeintner commented Nov 28, 2023

Based on the work started in https://github.com/eclipse-thingweb/node-wot/tree/semantic-layer I would like to continue working on providing a SemanticComposedThing as a wrapper around ConsumedThing.

The idea is that consumers no longer need to know the property name to get the data they want. Instead it should be possible to use @type (e.g., read property with "@type": "iot:BinarySwitchData")

Some thoughts:

  • node-wot could return SemanticComposedThing by default so that people already now can make use of this functionality
  • this could be an extensions/input of the scripting API

Note: at the moment the PR is still in draft state since there are many open questions (see code) especially if we want to properly define input/output data. Comments are welcome!

@danielpeintner danielpeintner marked this pull request as draft November 28, 2023 08:29
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (143c8a0) 76.52% compared to head (da9dee9) 76.52%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1174   +/-   ##
=======================================
  Coverage   76.52%   76.52%           
=======================================
  Files          80       80           
  Lines       16705    16705           
  Branches     1616     1616           
=======================================
  Hits        12784    12784           
  Misses       3891     3891           
  Partials       30       30           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@relu91
Copy link
Member

relu91 commented Nov 29, 2023

Some early feedback without looking at the code. My gut feeling is that this should be an extension to node-wot. Sort of a richer framework that we can build on top of the raw API. I believe that node-wot should stay as close as possible to the Thing Description interaction model abstraction. Anyhow I think the extension is a great idea, but I'd like to see it as a standalone project that uses node-wot rather than another package inside this project.

@danielpeintner
Copy link
Member Author

Some early feedback without looking at the code. My gut feeling is that this should be an extension to node-wot. Sort of a richer framework that we can build on top of the raw API.

This is good feedback and my response to it is as follows.
If we never "want" that to be standardized in the Scripting API I totally agree we should move out the extension. If we "think" this could make it into the spec I would got for it.
Anyhow, for the time being I think I can develop it as part of node-wot and at latest when we plan to merge this PR we need to decide...

@egekorkan
Copy link
Member

If we never "want" that to be standardized in the Scripting API

From some discussions in the TD/Binding TF at WoT WG, I remember others (@mjkoster if I am not wrong) having interest in this so it can indeed be standardized.

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

Successfully merging this pull request may close these issues.

3 participants