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

[Features] Support for pluggable session persistence storages #185

Merged
merged 6 commits into from
Aug 15, 2024

Conversation

ikatson
Copy link
Owner

@ikatson ikatson commented Aug 15, 2024

This rewrites session persistence entirely.

Previously it was a single JSON file hardcoded into session and flushed periodically. Now it's abstracted away and you can e.g. connect Postgres or whatever as session storage.

The only supported storage now is a folder where the database is a JSON file, and torrent bytes are stored as separate files.

It also causes some backwards incompatibility, esp. in the API layer, however the previous persistence format is tried to be preserved at least so that if you run it on top of existing file it would still remember the torrents you had previously added.

The main motivation was that storing torrent bytes into a single JSON file wasn't ideal esp. considering the file was flushed to disk every 10 seconds in a blocking manner.

And I wanted to store torrent bytes in it considering all the other recent changes that were made.

@ikatson ikatson merged commit 9d39411 into main Aug 15, 2024
4 checks passed
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.

1 participant