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

Introduce first strategic provider: do nothing #6292

Merged
merged 18 commits into from
May 31, 2019

Conversation

michaelavila
Copy link
Contributor

@michaelavila michaelavila commented May 2, 2019

These commits introduce an experimental provider system that, currently, does not provide. Functionality will be layered on to the experimental provider until it has all of the behavior needed to replace the default provider system.

The experimental system can be enabled by issuing the following command:

ipfs config Experimental.StrategicProviding true

Then you must restart your daemon.

@michaelavila michaelavila added the status/WIP This a Work In Progress label May 2, 2019
@ghost ghost assigned michaelavila May 2, 2019
@ghost ghost added the status/in-progress In progress label May 2, 2019
@michaelavila michaelavila force-pushed the experiment/provider-system-no-blocks branch 7 times, most recently from 9012d64 to 9a17914 Compare May 2, 2019 20:44
go.mod Outdated Show resolved Hide resolved
@michaelavila michaelavila force-pushed the experiment/provider-system-no-blocks branch from 9a17914 to 992ecb4 Compare May 2, 2019 22:10
core/node/provider.go Outdated Show resolved Hide resolved
@michaelavila michaelavila force-pushed the experiment/provider-system-no-blocks branch from 992ecb4 to 9112b91 Compare May 2, 2019 23:27
@michaelavila michaelavila changed the title [WIP] Introduce first strategic provider: do nothing Introduce first strategic provider: do nothing May 3, 2019
provider/system.go Outdated Show resolved Hide resolved
@michaelavila michaelavila force-pushed the experiment/provider-system-no-blocks branch from 9112b91 to cb92db3 Compare May 3, 2019 16:48
@michaelavila
Copy link
Contributor Author

@scout I think you'll find this PR useful. You mentioned to me not long ago that you'd like the ability to disable providing in IPFS without disabling content routing. This PR does exactly that. A series of upcoming PRs will flesh out the provider system further, but the ability to disable providing without disabling content routing itself will be preserved.

Is this something you can put to use right away? In its current form you'd need to set an experimental flag and restart the daemon. Will that work for what you have in mind?

@eefahy
Copy link

eefahy commented May 3, 2019

Thanks very much @michaelavila ! This will help a ton with debugging and observing bona-fide gateway traffic and save us some bandwidth costs to boot!

magik6k
magik6k previously requested changes May 4, 2019
Copy link
Member

@magik6k magik6k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll need to document some conventions used in the constructor after the refactors are done, the rest generally looks good.

core/builder.go Show resolved Hide resolved
core/node/core.go Outdated Show resolved Hide resolved
core/node/provider.go Outdated Show resolved Hide resolved
core/node/provider.go Outdated Show resolved Hide resolved
core/node/provider.go Outdated Show resolved Hide resolved
provider/offline.go Outdated Show resolved Hide resolved
provider/offline.go Outdated Show resolved Hide resolved
provider/simple/reprovide.go Show resolved Hide resolved
provider/system.go Outdated Show resolved Hide resolved
test/sharness/lib/iptb-lib.sh Outdated Show resolved Hide resolved
@magik6k
Copy link
Member

magik6k commented May 4, 2019

(also, more smaller commits would make reviewing easier)

@michaelavila michaelavila force-pushed the experiment/provider-system-no-blocks branch 3 times, most recently from e967e08 to b47b4aa Compare May 6, 2019 18:48
@michaelavila michaelavila force-pushed the experiment/provider-system-no-blocks branch 3 times, most recently from 5cf93f4 to 0a4beb0 Compare May 28, 2019 15:45
@michaelavila michaelavila dismissed magik6k’s stale review May 28, 2019 22:59

All feedback addressed.

Copy link
Member

@magik6k magik6k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (sorry for the delay, it somehow fell off my radar)

@michaelavila
Copy link
Contributor Author

@magik6k no worries, thanks for following up!

License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
@michaelavila michaelavila force-pushed the experiment/provider-system-no-blocks branch from 0a4beb0 to 065d783 Compare May 29, 2019 23:22
@Stebalien Stebalien merged commit 21b1547 into master May 31, 2019
@Stebalien
Copy link
Member

🚀

@Stebalien Stebalien deleted the experiment/provider-system-no-blocks branch May 31, 2019 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/in-progress In progress status/WIP This a Work In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants