Skip to content

refactor(core/routing): split ContentRouting interface - #3048

Merged
MarcoPolo merged 1 commit into
masterfrom
split-content-routing-interface
Nov 19, 2024
Merged

MarcoPolo merged 1 commit into
masterfrom
split-content-routing-interface

Conversation

@hsanjuan

@hsanjuan hsanjuan commented Nov 19, 2024 •

Copy link
Copy Markdown
Contributor

The ContentRouting interface does too much. One can think of systems that only Provide, and systems that only FindProviders.

Therefore I am proposing to split it further. While this can be done on user-code, core/routing interfaces are canonical and it is better to use interfaces coming from here.

As someone said: the best interface is that which does as little as possible.

Comment thread core/routing/routing.go Resolved
@willscott

Copy link
Copy Markdown
Contributor

Chiming in to say I agree with this direction - IPNI is a good example of a system where we've run into issues with there being a desire for the system to support provides as IPFS defines in delegated routing as part of being able to be used for queries.

The ContentRouting interface does too much. One can think of systems that only
Provide, and systems that only FindProviders.

Therefore I am proposing to split it further. While this can be done on
user-code, core/routing interfaces are canonical and it is better to use
interfaces coming from here.

As someone said: the best interface is that which does as little as possible.
@hsanjuan
hsanjuan force-pushed the split-content-routing-interface branch from 731e87e to 7ee1eaa Compare November 19, 2024 13:31
@sukunrt
sukunrt requested a review from MarcoPolo November 19, 2024 13:55

@sukunrt sukunrt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm fine with the change, but will let Marco opine as he has more understanding of this side of the codebase.

@MarcoPolo MarcoPolo changed the title Split ContentRouting interface refactor(core/routing): split ContentRouting interface Nov 19, 2024
@MarcoPolo
MarcoPolo merged commit e4db464 into master Nov 19, 2024
@hsanjuan
hsanjuan deleted the split-content-routing-interface branch November 20, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants