Skip to content

Seanaye/persistence trait#86

Open
seanaye wants to merge 15 commits into
n0-computer:mainfrom
seanaye:seanaye/persistence-trait
Open

Seanaye/persistence trait#86
seanaye wants to merge 15 commits into
n0-computer:mainfrom
seanaye:seanaye/persistence-trait

Conversation

@seanaye

@seanaye seanaye commented Apr 30, 2025

Copy link
Copy Markdown

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
remove comment
@rklaehn

rklaehn commented May 5, 2025

Copy link
Copy Markdown
Collaborator

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

seanaye commented May 6, 2025

Copy link
Copy Markdown
Author

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

@matthiasbeyer

Copy link
Copy Markdown

I believe this cannot be trivially rebased, right?

But I think this is crucial and should not be neglected by the iroh authors! Implementing the storage backend yourself is what downstream projects want to do most likely!

@okdistribute

Copy link
Copy Markdown

Hi @seanaye, are you still interested in using iroh-blobs for your work? This PR cannot be trivially rebased but we are interested in picking it back up again, maybe a quick discussion on what you want to accomplish and we can see how we can get it done

@seanaye

seanaye commented Jan 14, 2026

Copy link
Copy Markdown
Author

I could look into picking this back up again. It would be nice to support async storage for wasm contexts. I'm not sure what the timeline would look like on my end though

@matthiasbeyer

Copy link
Copy Markdown

async storage would also be nice for non-wasm contexts, because persistence is IO and doing that async'ly is (IMHO) the way to go. Especially because streaming is then only another step (streaming objects from network to storage, which would have the potential of greatly reducing memory load).

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.

4 participants