-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Delegate Reprovide to Content Routing System #2175
Comments
An alternative approach here is to make a new interface rather than try to extend the existing one. IMO there are few issues with the routing interfaces that we can fix in roughly the same way. Issues:
Potential Fix:
Side note: I doubt you want that |
I agree that making new interfaces makes more sense.
In theory, libp2p wouldn't need to deal with CIDs, or content routing at all. It must only handle peer routing (in a limited extent). IMO everything content routing should be handled at the IPFS level. I think that all content routers should all expose the same interface to IPFS implementations, even if the mechanics underneath is different. I am not against the idea of routing helpers, but I think they belong to the IPFS space, and not libp2p. Hence I like the idea of having these content routing interfaces defined at the IPFS level. Generics could be useful to reuse some strategy in different content routers (below the interface IPFS-ContentRouting).
+1 |
I think this is settled, so closing. If it's not we can re-open. |
Content Routing Systems should directly handle the Reprovide Operation. Currently, the implementations making use of Content Routers have to keep track of the content they are providing and periodically call the
Provide
method. Content Routing Systems may have different Reprovide mechanics, and internal optimizations.Examples:
I suggest adding a
StartProviding
and aStopProviding
methods to theContentRouting
interface. Content Routing Systems would expose a simple interface to provide content over time. Content Routing Systems would be responsible of republishing content where required.Change to take place in
routing.go
PS: I bet this change will have a lot of repercussions, hence I wanted to discuss it here first before opening a PR and breaking everything.
References:
The text was updated successfully, but these errors were encountered: