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

feat: Service peer selection on specific shards #1941

Closed
chair28980 opened this issue Aug 24, 2023 · 8 comments
Closed

feat: Service peer selection on specific shards #1941

chair28980 opened this issue Aug 24, 2023 · 8 comments
Assignees
Labels
E:1.4: Sharded peer management and discovery See https://github.com/waku-org/pm/issues/67 for details

Comments

@chair28980
Copy link
Contributor

Currently a service peer (e.g. a store node) is either provided by the application or it expects the peer manager to suggest a suitable service peer (selectPeer()). This task focuses on the latter: peer manager should provide ability to find service peers for a specific shard, based on the content topic that the application is interested in (e.g. an API call to selectPeer(Protocol, ContentTopic)), or kick off an ad-hoc discovery process until a suitable service peer is found. Client APIs (for filter, lightpush, peer-exchange) should automatically make use of this mechanism if the application does not explicitly set the desired service peer.

Priority: critical for launch

@SionoiS
Copy link
Contributor

SionoiS commented Sep 8, 2023

I've looked at the code and it seams easy to do.

The hard part is the architecture doesn't make it easy to access waku_dscv5.

Handlers would call selectPeer() then if none is found launch some discovery process.

@SionoiS
Copy link
Contributor

SionoiS commented Sep 18, 2023

Architecturally is seams that calling discv5 to find peers with specific shard and caps should be done at the app level.

Protocols clients impl. should not know about the discovery process.

@SionoiS
Copy link
Contributor

SionoiS commented Sep 20, 2023

Extracting all the protocols (leaving only mounting) from waku_node is harder than I thought. The external API sit at the node level and would have to change to app level.....

@SionoiS
Copy link
Contributor

SionoiS commented Sep 22, 2023

Weekly Update

  • achieved: peer manager can filter peer by shard, filter discv5 bootstrap nodes by shard, external APIs moved out of node folder
  • next: refactor APIs handlers to discover peers if none is found in peer manager with the required capability

@SionoiS
Copy link
Contributor

SionoiS commented Sep 29, 2023

Weekly Update

  • achieved: newly refactored STORE REST API handler that trigger discv5 peer search when needed.
  • next: refactor other APIs

@SionoiS
Copy link
Contributor

SionoiS commented Oct 5, 2023

Weekly Update

  • achieved: Filter, Store, Light push REST APIs discovery handler (a rework of the previous solution)

@SionoiS
Copy link
Contributor

SionoiS commented Oct 27, 2023

Weekly Update

  • achieved: REST APIs discovery handlers PR merged

@SionoiS
Copy link
Contributor

SionoiS commented Oct 27, 2023

Done

@SionoiS SionoiS closed this as completed Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:1.4: Sharded peer management and discovery See https://github.com/waku-org/pm/issues/67 for details
Projects
Archived in project
Development

No branches or pull requests

4 participants