Skip to content

feat: abstract provider side to decouple store and networking protocol #180

@rklaehn

Description

@rklaehn

Some users remarked that the network protocol and the storage is too coupled.

On the get side, it is already possible to use the iroh-blobs protocol without a store, although of course with a bit of extra effort. But on the provider side you either need a Store, or you need to implement the entire protocol manually. Helper fns like https://docs.rs/iroh-blobs/latest/iroh_blobs/provider/fn.handle_get.html require a Store instance.

We could abstract this side as well, e.g. by having a trait or other abstraction (protocol subset?) that only handles the part of the store that is needed for handling get. The default would still be to take a Store, so default usage would not change much. Besides, even handle_connection and handle_get are already low level fns that normal users that use the protocol handler are not exposed to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions