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

Add options to select provider preferences #3813

Closed
whyrusleeping opened this issue Mar 22, 2017 · 9 comments
Closed

Add options to select provider preferences #3813

whyrusleeping opened this issue Mar 22, 2017 · 9 comments
Assignees
Labels
need/analysis Needs further analysis before proceeding need/community-input Needs input from the wider community topic/provider Topic provider

Comments

@whyrusleeping
Copy link
Member

Sending out dht provider messages is the biggest pain point in ipfs right now. I have tried brainstorming solutions: ipfs/notes#162, but that hasnt produced anything yet that i feel actually solves the problems.

So to help with the issue for now, i propose we implement four provider options as follows:

none

Provide nothing, this should do roughly what the --routing=none daemon flag does, except still allow using the dht for findpeer queries and ipns. The downside here is that other peers will not be able to discover content your peer has available (though, upon direct connect, will still be able to request it)

pins

Provide all pinned content. Only content you explicitly pin will be announced to the network, the rest will be available if directly requested, but not advertised

pinroots

Provide only the pin roots. This will be a very minimal option, only the hashes that are pinned (and not their children) will be announced.

noleaves

Provide all content that is not a 'leaf' node. Where in this case a leaf node would be anything that is not the root of a larger object. For instance, only the top node of a large VM image would be announced, while all the hundreds of gigs of data blocks would not be. This option is a bit trickier to implement

@hsanjuan
Copy link
Contributor

Wondering, what are the use cases for pinroots/noleaves ?

@whyrusleeping
Copy link
Member Author

@hsanjuan the idea is to still provide some information to the network, but to do much less of it. pinroots would still allow peers on the network to find your pinned content, but not find random access items below pinned things. noleaves would still allow random access of all files and directories, but wouldnt allow peers to find data blocks under a file (though if they are connected to you and are reading a file, everything would work out because we only search for providers when none of our bitswap peers have a given block)

@Kubuxu Kubuxu added need/community-input Needs input from the wider community need/analysis Needs further analysis before proceeding labels Apr 17, 2017
@Stebalien
Copy link
Member

We could also have smart strategies where we mark blocks that should be provided when we add them to IPFS. The IPFS add command could, e.g., mark the roots nodes of directories/files. However, to get this working, we'll need a nice way to attach local metadata to blocks (this would be rather nice to have anyways).

@whyrusleeping
Copy link
Member Author

ref #4113

@whyrusleeping
Copy link
Member Author

I think a good next step here would be to make provider strategies apply as content is added. So if your strategy is 'pinned content' and you add something with --pin=false, it shouldnt provide any of those blocks.

cc @magik6k

@magik6k
Copy link
Member

magik6k commented Sep 2, 2017

Sounds good, will have a look at this soon.

@eingenito
Copy link
Contributor

@magik6k have you started this work? I'd like to take it on if you haven't already.

@magik6k
Copy link
Member

magik6k commented Oct 7, 2018

Yup, there is some work in on this in #4333, but since I last touched it, some modules were extracted (well, bitswap), so you'll probably need to apply this manually.

@michaelavila
Copy link
Contributor

This work is being tracked here: #5774 and references this issue, so I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/analysis Needs further analysis before proceeding need/community-input Needs input from the wider community topic/provider Topic provider
Projects
None yet
Development

No branches or pull requests

7 participants