openworm / owmeta-core

Core library for owmeta
MIT License
3 stars 2 forks source link

Create bi-directional schema version adapters #20

Open mwatts15 opened 6 years ago

mwatts15 commented 6 years ago

To support the use of data in a forward and backward-compatible manner, we can employ "schema version adapters" to translate between different versions of a schema. Such adapters would work at the point where they are needed in code in order to make data generated at a later date accessible to code created at an earlier date while still allowing the newer data to follow the structure of the most recent version. Such a scheme would need, in general, at least m-1 adapters for m versions since adapters could be chained. More adapters could be created for non-adjacent version numbers for efficiency or to preserve fields that were lost in an intermediate version.