opensensorhub / osh-core

OpenSensorHub Core Modules
http://docs.opensensorhub.org
Mozilla Public License 2.0
32 stars 16 forks source link

Allow schema evolution in storage API #102

Closed alexrobin closed 4 years ago

alexrobin commented 6 years ago

Currently, changing the schema of a data stream in a storage is not possible. Data blocks with a new schema are not rejected but the data cannot be properly decoded as it doesn't match the description.

This should be improved to allow data records attached to different schema versions to coexist in the same data store. One way to achieve this would be to wrap the different schemas in a DataChoice, with the choice token indicating the version.

alexrobin commented 4 years ago

The new datastore API implements versioning by exposing a different instance of DataStreamInfo every time the record structure changes. These instances share the same datastream ID and output name but have different version numbers.