Change metadata representation in DB #1572
Labels
acquisition
changes acquisition logic
api change
affect the API and its responses
enhancement
mysql
mysql database related
python
Pull requests that update Python code
refactor
Substantial projects to make the code do the same thing, better.
Signal metadata is stored in a large JSON-encoded text field in a DB table with only one row. This works well enough currently, but it is inefficient in a number of ways. For instance: changing any value (like updating a single signal) requires re-writing the entirety of the JSON string, and we have API methods that decode the JSON (ex 1, ex2) then perform operations on the result then re-encode it before serving it to clients. Among other things, this approach is not good for concurrency and it does not leverage the power of a DBMS.
An improvement would be to give the metadata table a schema that uses individual columns for each metric, and a row for each signal.
This can aid in making it easier to do things like #289.
The text was updated successfully, but these errors were encountered: