Skip to content

Point users at canonical kubo/client/rpc library #9124

Closed

Description

@lidel

Part of #8959 – based on discussions from IPFS Thing 2022
JS counterpart: #9125

Current state

Screenshot 2022-07-19 at 14-49-53 ipfs_kubo IPFS implementation in Go

We have two RPC clients for "GO-IPFS":

After renaming to Kubo, this state of things is arguably a really really bad user experience:

  • Which RPC client should GO developers use to interact with Kubo?
  • What is the reason to choose one over another?

Desired state

Ideally, we should have one Kubo client at https://github.com/ipfs/go-kubo-rpc-client

Keeping go- prefix is important because we want consistency across languages,
and Kubo team will maintain go-kubo-rpc-client too.

TODO

cc @2color @BigLep @Jorropo @ajnavarro

Activity

  1. changed the title [-]Create go-kubo-rpc-client[/-] [+]Create go-kubo-rpc-client library[/+] on Jul 19, 2022
  2. moved this to 🥞 Todo in IPFS Shipyard Teamon Jul 19, 2022
  3. lidel commented on Dec 9, 2022

    @lidel
    ContributorAuthor

    Food for thought:

    Our CLI for RPC over HTTP is built with https://github.com/ipfs/go-ipfs-cmds/

    We use this library for generating docs at https://docs.ipfs.tech/reference/kubo/rpc/
    (Generator code at https://github.com/ipfs/ipfs-docs/tree/main/tools/http-api-docs)

    Would be really nice if we leveraged this somehow in HTTP client library.

    Ideally, it would depend on Kubo, and generate client for commands based on go-ipfs-cmds annotations present in Kubo sources. Not sure how feasible this is, but someone wants to explore this, we could add more annotations if needed – prior art in #8802.

  4. lidel commented on May 22, 2023

    @lidel
    ContributorAuthor

    Triage notes:

  5. MichaelMure commented on May 22, 2023

    @MichaelMure
    Contributor

    One not-so-nice aspect of this idea is that suddenly your API client depend on quite heavy and break prone dependencies like libp2p. Maybe consider at least a dedicated go.mod file?

  6. Jorropo commented on May 22, 2023

    @Jorropo
    Contributor

    @MichaelMure go-ipfs-http-client already depends on libp2p https://github.com/ipfs/go-ipfs-http-client/blob/b19af5f15743e0923bae036babdf5437624142a7/go.mod#L11, this is required to provide better types than string everywhere in the API (peer.ID, ...).
    I'm not planning to move go-ipfs-api, as it's not a blocker for our CI and I don't want to have to think about two HTTP clients.

  7. lidel commented on May 23, 2023

    @lidel
    ContributorAuthor

    @Jorropo is go-ipfs-http-client the thing we want to support going forward?
    If so, should we rename it to ./client/go-kubo-rpc-client or ./client/httprpc or ./client/kuborpc during the move, to avoid renaming in the future?
    (one breaking change, instead of two)

  8. BigLep commented on May 23, 2023

    @BigLep
    Contributor

    2023-05-23 conversation:

    • We are going to copy to ./client/httprpc
    • Add Kubo changelog.md
    • go-ipfs-http-client: Add stubs
    • go-ipfs-http-client: Add readme notice
    • go-ipfs-http-client: archive the repo
  9. lidel commented on May 23, 2023

    @lidel
    ContributorAuthor

    Maybe let's just call it client/rpc? Will look less ugly, and will allow us to use websockets or webtransport behind the scenes if we ever need to opportunistically use other transport than plain HTTP:

    kuboClient "github.com/ipfs/kubo/client/rpc"
    node, err := kuboClient.NewLocalApi()
  10. BigLep commented on May 30, 2023

    @BigLep
    Contributor

    @Jorropo : do you have the corresponding PR for this?

  11. Jorropo commented on May 30, 2023

    @Jorropo
    Contributor

    do you have the corresponding PR for this?

    #9906

  12. changed the title [-]Create go-kubo-rpc-client library[/-] [+]Create canonical kubo/client/rpc library[/+] on Jun 15, 2023
  13. changed the title [-]Create canonical kubo/client/rpc library[/-] [+]Point users at canonical kubo/client/rpc library[/+] on Jun 15, 2023
  14. lidel commented on Jun 15, 2023

    @lidel
    ContributorAuthor

    Updated progress in the top comment + filled ipfs/go-ipfs-http-client#184 and ipfs/go-ipfs-api#296 based on my understanding of next steps.

  15. ElPaisano commented on Aug 22, 2023

    @ElPaisano
    Contributor

    Hi all, triaging old ipfs-docs issues right now and I came across Issue 1194: List other Kubo RPC API clients, which depends on this. It looks like work can't yet start on 1194?

  16. lidel commented on Aug 22, 2023

    @lidel
    ContributorAuthor

    @ElPaisano good question!

    We've had a release with kubo/client/rpc library already, so I think we can move forward with this in sense that we no longer mention https://github.com/ipfs/go-ipfs-http-client and https://github.com/ipfs/go-ipfs-api and instead point users in docs and readmes to kubo/client/rpc which lives in this repo.

    (This can happen without being blocked by ipfs/go-ipfs-http-client#184 and ipfs/go-ipfs-api#296)

  17. Jorropo commented on Aug 22, 2023

    @Jorropo
    Contributor

    https://github.com/ipfs/go-ipfs-api is not replaced by kubo/client/rpc, ideally we would but the coreapi implemented by kubo/client/rpc lacks some Kubo features and endpoints.

    kubo/client/rpc is a direct upgrade of https://github.com/ipfs/go-ipfs-http-client in all ways (it's a fork after all)

  18. BigLep commented on Aug 22, 2023

    @BigLep
    Contributor

    kubo/client/rpc is the only thing we're supporting or investing in. Lets just point users there.

    As a result, I agree with @lidel, that ipfs/ipfs-docs#1194 shouldn't be blocked. Carry on please @ElPaisano.

  19. ElPaisano commented on Aug 22, 2023

    @ElPaisano
    Contributor

    sounds good, thanks all

  20. BigLep commented on Oct 5, 2023

    @BigLep
    Contributor

    2023-10-05 conversation: emphasis before IPFS Connect is just to make sure we're always pointing at the new thing.

  21. hacdias commented on Oct 13, 2023

    @hacdias
    Member

    The only point remaining here is to create an automation to alert us when a new command is added, which I extracted to #10178. I think that is enough of its own thing to deserve its own issue. Therefore, I am closing this one. I think the main points (documentation, archiving repositories, directing to new clients) have been done.

    If you find a wild mention to the old clients that we no longer want to support, feel free to submit a PR to replace the links.

  22. moved this from 🥞 Todo to 🎉 Done in IPFS Shipyard Teamon Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址