Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dag API should let a user ask for the daemon to fetch data matching a selector #8239

Open
warpfork opened this issue Jul 1, 2021 · 9 comments
Labels
exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/feature A new feature status/ready Ready to be worked

Comments

@warpfork
Copy link
Member

warpfork commented Jul 1, 2021

Feature description:

The ipfs dag API should let a user ask for the daemon to fetch data matching a selector.

  • The data should become local to the daemon.
  • We may need a way to wait for this.
  • We don't necessarily need all that data streamed back from the same API invocation (!).
  • We don't necessarily care what the transport behavior is that the daemon uses internally. (Maybe it's graphsync, and that's probably a good fit since it already consumes selectors -- but the end user doesn't necessarily care, just wants this to be fast, and work.)

Motivation:

Users might have large data structures that they want to work on, and want to get these locally before starting to work with them, for performance reasons; or, want to get them locally simply so they can confidentally go offline.

Ceramic has a good example story like this:

  • Ceramic's "Streams" are a fairly long chain-like structure -- so fetching them iteratively can be somewhat slow (it will pipeline stall and experience network latency repeatedly as it's going down the chain).
  • Being able to request large amounts of this chain from a peer at once would speed things up significantly.
  • At the same time, Ceramic already has other code that talks to an IPFS API iteratively... but on a much lower latency connection than is involved in a network peer fetch. So this part is fine staying as it is.
    • (They could also use a CAR API endpoint... but don't need to. And sometimes may not actually need to review all of the data they fetch in one time, so the "fetch this" and "show me this" are sometimes different steps.)

Disambiguation:

This is very similar and related to some plans for having APIs that return CAR files (because we figure those APIs should also be able to return a CAR that's matching a selector). It's slightly different, however, because the user story here involves the user being willing to make iterative requests to get the data after it's local -- it doesn't require CARs; and users could keep using their existing iterative conversational API with IPFS without changing anything, while still gettting performance improvements by nudging the daemon to get all the data ready up-front.

@warpfork warpfork added need/triage Needs initial labeling and prioritization kind/feature A new feature labels Jul 1, 2021
@welcome
Copy link

welcome bot commented Jul 1, 2021

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@warpfork warpfork added this to the go-ipfs 0.10 milestone Jul 1, 2021
@warpfork
Copy link
Member Author

warpfork commented Jul 1, 2021

(I've suggested adding this to the v0.10 milestone just now, but am not sure if it will actually belong in that scope or not -- can discuss.)

@warpfork
Copy link
Member Author

warpfork commented Jul 1, 2021

@oed I think I've captured some of what you've described to me as a want here -- but please correct it if I got anything wrong here.

I did generalize it a bit -- our conversation earlier started with "graphsync", but I think the description here still fits the ask and technically managed to stay one step removed from that detail.

@oed
Copy link

oed commented Jul 1, 2021

Thanks @warpfork, this would be a very useful feature indeed!

@BigLep BigLep added this to Backlog in Go IPFS Roadmap Jul 20, 2021
@BigLep
Copy link
Contributor

BigLep commented Jul 27, 2021

Per 2021-07-27 go-ipfs standup conversation, this can get done once #7976 is completed

@BigLep BigLep added status/blocked Unable to be worked further until needs are met and removed need/triage Needs initial labeling and prioritization labels Aug 5, 2021
@BigLep BigLep modified the milestones: go-ipfs 0.10, go-ipfs 0.11 Aug 14, 2021
@BigLep BigLep moved this from Current Release Backlog to Future Release Backlog in Go IPFS Roadmap Aug 17, 2021
@BigLep BigLep modified the milestones: go-ipfs 0.11, go-ipfs 0.13 Sep 2, 2021
@BigLep BigLep moved this from Next Release Backlog to Next Next Release in Go IPFS Roadmap Sep 2, 2021
@warpfork
Copy link
Member Author

warpfork commented Sep 2, 2021

@oed
Copy link

oed commented Sep 3, 2021

@warpfork is that a doc that could be shared publicly? 🙏

@stbrody
Copy link

stbrody commented Oct 26, 2021

FYI I just opened #8526 with a related feature request that would also be necessary to enable efficient traversal over complex IPLD data structures

@BigLep BigLep added exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue status/ready Ready to be worked and removed status/blocked Unable to be worked further until needs are met labels Jan 7, 2022
@BigLep
Copy link
Contributor

BigLep commented Jan 7, 2022

2022-01-07 discussion: a big challenge is how to put selectors on the command line, but that has been solved with Lotus so we should be able to just follow suit.

@BigLep BigLep added exp/intermediate Prior experience is likely helpful and removed exp/novice Someone with a little familiarity can pick up labels Jan 7, 2022
@BigLep BigLep modified the milestones: go-ipfs 0.13, Best Effort Track Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/feature A new feature status/ready Ready to be worked
Projects
No open projects
Go IPFS Roadmap
  
Next Next Release
Status: 🥞 Todo
Development

No branches or pull requests

4 participants