Skip to content

[Features] Support for pluggable session persistence storages#185

Merged
ikatson merged 6 commits intomainfrom
session-db
Aug 15, 2024
Merged

[Features] Support for pluggable session persistence storages#185
ikatson merged 6 commits intomainfrom
session-db

Conversation

@ikatson
Copy link
Copy Markdown
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
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