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

Feature request: storing the snapshot's JSON in ActiveStorage instead of the database #48

Open
feliperaul opened this issue Feb 9, 2024 · 1 comment

Comments

@feliperaul
Copy link

First of all, this gem brings a fresh approach to version tracking and I love it! Very well written, congrats.

When using version tracking, specially with heavy models (think long text / html documents, where each save creates a snapshot), the number of versions tracked can really start bloating up the database.

Even if the developer is considerate with the settings (how long and how many versions are tracked), I still think that only the Snapshots (which are the 'metadata' of each version) need to be in the database; the actual JSON of the models stored could be stored in S3 and fetched only when needed.

This is because, in general, version tracking UI is not used frequently by the users; it's often a 'backup restore' kinda of feature.

So the user can tolerate a few extra ms of latency when fetching versions, and I think that even holds when you are comparing the JSON between two versions for some diffing.

Do you think supporting ActiveStorage storage of the JSON blobs would be something to be implemented in the feature, as an option for the user, being configured on a per-model basis?

@westonganger
Copy link
Owner

@feliperaul I think that this is a cool idea and would be interested in a PR which implements this.

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

No branches or pull requests

2 participants