Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

feat: .get(<cid array>) from the DAG API #216

Closed
daviddias opened this issue May 30, 2018 · 6 comments
Closed

feat: .get(<cid array>) from the DAG API #216

daviddias opened this issue May 30, 2018 · 6 comments
Assignees
Labels
P1 High: Likely tackled by core team if no one steps up

Comments

@daviddias
Copy link
Contributor

So that the DHT can handle multiple block requests without blasting hundreds of requests. Needed for ipfs/js-ipfs#856

@daviddias daviddias added the P1 High: Likely tackled by core team if no one steps up label May 30, 2018
@daviddias daviddias self-assigned this Jun 4, 2018
@daviddias daviddias added the status/ready Ready to be worked label Jun 4, 2018
@daviddias daviddias changed the title feat: .getMany feat: .get(<cid array>) from the DAG API Jun 4, 2018
@daviddias
Copy link
Contributor Author

Quick correction, this module uses the DAG API and therefore needs and function call there that can return multiple IPLD nodes.

This is intertwined with the GraphSync effort. @vmx do you already have code for this?

@daviddias daviddias assigned vmx and unassigned daviddias Jun 4, 2018
@vmx
Copy link
Contributor

vmx commented Jun 6, 2018

No, I haven't any code for this yet.

@daviddias
Copy link
Contributor Author

@achingbrain now that @vmx shipped getMany on IPLD, can you look into shipping this one? It is needed for the DHT effort ipfs/js-ipfs#856

@achingbrain achingbrain self-assigned this Nov 14, 2018
@achingbrain
Copy link
Collaborator

Just checking what the requirement is here - after chatting with @vasco-santos it doesn't sound like there's much to do from a DHT Endeavour perspective?

We can expose ipld.getMany as ipfs.dag.getMany (or perhaps just chain through if an array of CIDs is passed to ipfs.dag.get), and then this module can use it when exporting a DAGNodes worth of DAGLinks which should be a nice performance improvement, but it doesn't sound like that would hold up the DHT effort.

@diasdavid have I missed something? What changes did you have in mind that would resolve this issue?

@daviddias
Copy link
Contributor Author

It doesn't need to block the DHT effort but it will quickly be a issue if we do a DHT query for every single block we need to fetch. Using the .getMany is a first step towards a maintainable solution.

achingbrain added a commit to ipfs-inactive/js-ipfs-unixfs-exporter that referenced this issue Nov 15, 2018
Fixes ipfs-inactive/js-ipfs-unixfs-engine#216 by using one call to `dag.getMany`
for all children of a given node instead of multiple calls to `dag.get`.
achingbrain added a commit to ipfs-inactive/js-ipfs-unixfs-exporter that referenced this issue Nov 15, 2018
Fixes ipfs-inactive/js-ipfs-unixfs-engine#216 by using one call to `dag.getMany`
for all children of a given node instead of multiple calls to `dag.get`.
@achingbrain
Copy link
Collaborator

I've implemented this in the shiny new decomposed ipfs/js-ipfs-unixfs-exporter repo.

achingbrain added a commit to ipfs-inactive/js-ipfs-unixfs-exporter that referenced this issue Nov 23, 2018
Fixes ipfs-inactive/js-ipfs-unixfs-engine#216 by using one call to `dag.getMany`
for all children of a given node instead of multiple calls to `dag.get`.
@ghost ghost removed the status/ready Ready to be worked label Nov 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 High: Likely tackled by core team if no one steps up
Projects
None yet
Development

No branches or pull requests

3 participants