n0-computer / iroh

peer-2-peer that just works
https://iroh.computer
Apache License 2.0
2.6k stars 164 forks source link

consider a blob export format: "move and delete from store" #2801

Open cblgh opened 1 month ago

cblgh commented 1 month ago

hiya!

been looking over some of the SDKs and came across blob export formats. for the use case under consideration, it would be desirable to:

  1. use iroh and its high level functions to sync a file (just a blob, not a document)
  2. once synced, move the blob outside of the store
  3. then finally, remove the blob from the store

it currently looks like the blob export api and the available configuration options (blob export formats?) keep the blob intact with the store, which is probably desirable for many use cases! but in this instance it would be important to remove it from the store after sync has been accomplished and the blob exported elsewhere.

in practice doing blobs().writeToPath (SDK method) followed by a blobs.client.delete_blob, but in one swoop of the export function call.

not sure if this additional export format is out of scope, or too complicated, but i figured i should give y'all a shout as it's stemming from a genuine use case

ty for everything!

rklaehn commented 1 month ago

Hi. Thanks for the issue.

I think the way I want to approach this is to have a batch api that allows you to combine multiple operations in a single batch. Otherwise there is a very large number of possible things people might want to do, and we can't have a separate API call for every single use case.

Development of the blobs API has slowed a bit in 2024, since it works well enough and I focused a lot on outreach this year. The plan is to get to iroh 1.0 in 2025, move blobs out, and get to blobs 1.0 as well, or at least 1.0 rc. So I will invest more time in blobs in the coming months...