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

Batch Observations Use Case #163

Open
doublebyte1 opened this issue Aug 2, 2023 · 2 comments
Open

Batch Observations Use Case #163

doublebyte1 opened this issue Aug 2, 2023 · 2 comments

Comments

@doublebyte1
Copy link

doublebyte1 commented Aug 2, 2023

I acknowledge that STA is designed for IoT devices, where we have streams of real-time data, but I was wondering if it could be used in the context of offline experiments? This is the case where an experiment (e.g.: a Thing) is run and the data is persisted in a storage device, like an hard-drive. Subsequently, the complete dataset (e.g.: all the observations) would be submitted to an STA server.

I am also unsure about how to use the data model, to best describe the case where the sensor is moving. From the discussion here: #33 , I infer that the best approach would be to use the HistoricalLocation entity set. In the case of an offline experiment, the Location could be the most current one, i.e., the one from the last observation, while all the previous locations would be the in the set of HistoricalLocation. Would this be the correct approach?

If that is the case, is it possible to insert the complete dataset, i.e., as a payload of a POST request, containing an array of locations? Does anyone has any examples of a how such a payload would look like (e.g.: the actual JSON file)?

@doublebyte1
Copy link
Author

doublebyte1 commented Aug 2, 2023

@PascalLike

@hylkevds
Copy link
Contributor

hylkevds commented Aug 9, 2023

Creating entities is done one at a time, though Observations can be posted many-in-one-go using DataArrays.
Those individual posts can be gathered into one batch operation using the Batch Processing extension for increased efficiency.

When dealing with moving things, the order of inserts is important when you use the automatically generated FeatureOfInterest. The FeatureOfInterest of an Observation is then generated from the currently set Location of the Thing. If you explicitly create the FeatureOfInterest when posting an Observation this doesn't matter.

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

No branches or pull requests

2 participants