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

Subscribe to the "mailbox topics" of close peers #10

Closed
lyulka opened this issue Aug 2, 2023 · 1 comment
Closed

Subscribe to the "mailbox topics" of close peers #10

lyulka opened this issue Aug 2, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@lyulka
Copy link
Collaborator

lyulka commented Aug 2, 2023

Background

Right now, the only peer which subscribes to a particular "mailbox topic" (the topic associated with a particular Public Address) is the replica which is identified by that Public Address.

This means that unicast messages are never sent eagerly and through full-message pairings. Instead, for a unicast message to arrive at its recipient:

  1. Its metadata record needs to be gossiped to the recipient.
  2. The recipient then needs to state that it wants the message ("IWANT").
  3. The recipient then needs to wait until the IWANT arrives at a peer which has the full message: either the sending peer, or a peer which was lucky enough to have been gossiped the message in a heartbeat (by default, 1 second).
  4. Finally, the recipient needs to wait for the message to finally arrive.

This makes the sending of unicast messages slow.

Proposed solution

Peers should subscribe to the individual topics of other peers that are close to them. This greatly increases the likelihood that a sending peer which is sending a unicast message has a full-message peering for the mailbox topic of the recipient, and therefore will send the message immediately.

@lyulka lyulka added the enhancement New feature or request label Aug 2, 2023
@lyulka
Copy link
Collaborator Author

lyulka commented Aug 2, 2023

@lyulka lyulka closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant