Skip to content

Seanaye/persistence trait #86

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

seanaye
Copy link

@seanaye seanaye commented Apr 30, 2025

Description

This MR introduces a Persistence trait which abstracts away the persistence layer for Completed bao files. This means that you can BYO persistence impl to the current fs store (e.g. S3).

Breaking Changes

The external facing breaking changes are mostly around the "asyncification" of certain trait methods. I will update this section in more detail later.

Notes & open questions

This is still a draft MR I am just looking for feedback on the general approach before I clean things up a bit more. e.g. There are some places that can panic right now

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@n0bot n0bot bot added this to iroh Apr 30, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Apr 30, 2025
@seanaye seanaye force-pushed the seanaye/persistence-trait branch from 7cd707a to 62848da Compare May 1, 2025 02:55
@seanaye seanaye marked this pull request as ready for review May 1, 2025 02:55
@seanaye seanaye force-pushed the seanaye/persistence-trait branch 3 times, most recently from 0f4e60f to 663ba56 Compare May 1, 2025 03:06
@seanaye seanaye force-pushed the seanaye/persistence-trait branch from 663ba56 to 5d30c2a Compare May 1, 2025 03:15
@seanaye seanaye force-pushed the seanaye/persistence-trait branch from 5d30c2a to 8e1644d Compare May 1, 2025 21:39
@seanaye seanaye force-pushed the seanaye/persistence-trait branch from 8e1644d to ef8c7f0 Compare May 1, 2025 21:40
@rklaehn
Copy link
Collaborator

rklaehn commented May 5, 2025

Thanks for the PR. I will have to check if the storage abstraction adds performance costs for the very important local/sync case.

It might be that the best way to deal with this use case is to have a separate store implementation that allows plugging in an async storage backend, since the local store is very performance critical.

The way I usually test this is by using sendme and then syncing a directory structure that contains a lot of tiny files, like the linux kernel.

Warning: I got some important deadlines the next weeks and won't be able to look into this until after may 18.

@seanaye
Copy link
Author

seanaye commented May 6, 2025

Thanks for taking a look, I will test with sendme. Is there a specific command you use to benchmark the impl? I still have a few commits to push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

2 participants