Skip to content

implement fallback plebbit.clients #61

@estebanabaroa

Description

@estebanabaroa

for example, maybe the user has a libp2pjs client set, but for whatever reason, it fails to fetch, it would be good to be able to fallback to gateways. same for publishing.

one way to do it would be using the same method as kubo http routing
https://github.com/ipfs/kubo/blob/master/docs/delegated-routing.md#parallel

    Timeout:duration: Time will start counting when this specific router is called, and it will stop when the router returns, or we reach the specified timeout.
    ExecuteAfter:duration: Providing this param will delay the execution of that router at the specified time. It accepts strings compatible with Go time.ParseDuration(string).

we could run all clients in parallel, with a timeout and executeAfter setting, it would create a fallback, for example if libp2pjs doesnt work after 10 seconds, try the gateways, etc.

we should probably keep testing libp2pjs clients for a while to figure out if this design or another would work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions