Skip to content

Change metadata representation in DB #1572

Open
@melange396

Description

@melange396

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acquisitionchanges acquisition logicapi changeaffect the API and its responsesenhancementmysqlmysql database relatedpythonPull requests that update Python coderefactorSubstantial projects to make the code do the same thing, better.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions