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

EES-4950 Re-model data set version change sets #5089

Merged
merged 2 commits into from
Jul 25, 2024
Merged

EES-4950 Re-model data set version change sets #5089

merged 2 commits into from
Jul 25, 2024

Conversation

ntsim
Copy link
Collaborator

@ntsim ntsim commented Jul 23, 2024

This PR re-models changelogs for data set versions (i.e. v1.1+) towards a more traditional normalised schema (instead of using JSONB). This provides the usual benefits of normalisation (referential integrity, de-duplication) and produces less overhead in terms of the code that needs to be written.

The downside is that larger changelogs can have many changes, potentially resulting in poorer performance than de-normalised JSONB (due to joining across potentially hundreds / thousands of rows).

After a little discussion with @duncan-at-hiveit, we agreed on balance, the benefits of the normalised approach outweighed the downsides. Additionally, any potential performance issues are addressable via caching (e.g. blob cache) of the entire changelog.

@ntsim ntsim force-pushed the ees-4950 branch 2 times, most recently from ec5a882 to 6908f05 Compare July 25, 2024 12:17
ntsim added 2 commits July 25, 2024 14:14
This re-models the changelog data models by:

- Removing `ChangeSets`
- Removing JSONB columns in favour of a standard relational model using
  foreign keys (i.e. previous / current states).

We've moved towards this approach as it allows us to avoid duplicating
the entire meta domain in JSONB columns (and respective models).
Using normal foreign key references means we can keep things relatively
simple.

The only issue is that we don't know if this approach will perform well
at scale, but we believe it'd be possibel to remedy this with blob
caching (or similar).

EES-4921 Test filter / location option changes using owned entities
@ntsim ntsim merged commit 62d845e into dev Jul 25, 2024
7 checks passed
@ntsim ntsim deleted the ees-4950 branch July 25, 2024 13:33
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

Successfully merging this pull request may close these issues.

2 participants