w3c / wot-usecases

Repository of the WoT IG to discuss possible WoT use cases
https://w3c.github.io/wot-usecases/
21 stars 34 forks source link

[TEST] Historical Data #296

Open egekorkan opened 1 month ago

egekorkan commented 1 month ago

Submitter

Ege Korkan

What to be done?

I want to access the historical data of my devices.

Why WoT? (Stakeholder's interest in using WoT)

I am already using WoT. It helps me combat the variety of protocols present in our industrial systems.

Description

I have devices whose property and event values can be stored in a time-series database like InfluxDB. I want to convey in the TD that historical values are possible for each property and event. The data is about the Thing but is not hosted by the Thing so the href value in the forms will differ for historical values and for real-time values.

Gaps between the user's need and what's possible today

I can model historical data as separate affordances but they are about the same affordance so I prefer not to. Also, I want to use WoT technologies and not switch to OpenAPI or similar just for historical data of my Things.

Target Users

Other Target Users

Application developer (the person who writes the Consumer-level application, e.g. a Dashboard).

Expected Devices

Mostly sensors

Expected Data

sensor data: real time and historical

Potential Adopters

Not sure what is meant here

Potential Applications

Not sure what is meant here

Expected Protocol

Mostly HTTP for historical data from the database. The protocol to get the real-time data into the DB depends on the database chosen. The protocol to get real-time data in the first place depends on the device but we have that covered in our implementation.

Existing similar WoT use case already defined?

See https://github.com/w3c/wot/blob/main/planning/ThingDescription/analysis-historical-data-work-item.md

Dependencies on WoT - Affected WoT deliverables and/or work items

TD

Other WG's standards, e.g., HTML/CSS, Device APIs, DID/Verifiable Credentials, JSON-LD and RDF

MUST BE OPTIONAL

Expected relationship with Existing standards by other WGs within W3C

MUST BE OPTIONAL

Existing standards outside W3C

Expected relationship with existing standards outside W3C

Not sure about the difference with above. Also MUST BE OPTIONAL

Security Considerations

none more than what is already known

Privacy Considerations

historical data can span over a long time and can contain data about people or processes. E.g. I get the historical data of yesterday for my hotel room and can deduce that the person was heating the room in energy shortage and can call the authorities

Accessibility Considerations

none other than what is already known

Internationalization (i18n) Considerations

historical payloads can contain data that cannot be internationalized. An example is below:

    "_time": 1614253728439,
    "OriginalTime": 1614253719434,
    "assetId": "0",
    "featureName": "testFeature",
    "sensorId": "601804",
    "sensortest01": "50",
    "sensortest02": "50"
}, {
    "_time": 1614254044553,
    "OriginalTime": 1614254035648,
    "assetId": "0",
    "featureName": "testFeature",
    "sensorId": "601805",
    "sensortest01": "55",
    "sensortest02": "51"
}]

We cannot transform these values to another language since they are hard-coded in the application.

egekorkan commented 1 month ago

I have done a test run and I am confident that this template is not ready for going public. We have to quickly iterate on the PRs that are open since multiple weeks.

chachamimm commented 1 month ago

Thank you.

@egekorkan, if you have some opinions, please post them in Github Issues.

egekorkan commented 1 month ago

@egekorkan, if you have some opinions, please post them in Github Issues.

I will wait for some PRs such as https://github.com/w3c/wot-usecases/pull/285 to be merged or closed since some of my complaints are addressed there.