Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Have swarm_server maintain N open peer connections #43

Closed
5 tasks done
madninja opened this issue Mar 13, 2018 · 1 comment
Closed
5 tasks done

Have swarm_server maintain N open peer connections #43

madninja opened this issue Mar 13, 2018 · 1 comment
Assignees

Comments

@madninja
Copy link
Member

madninja commented Mar 13, 2018

Have the swarm (through a session_agent) maintain a configurable set of connections to randomly selected peers.

  • The configuration would ideally be a module name in the swam options with a simple default. So that applications can supply a more complex one if they have more context to be able to generate a diverse set of peer addresses from the peerbook.

  • When agent detects a disconnected peer connection it should randomly select a new peer address and connect to it.

  • Have the session_agent forget an existing connection on a regular schedule. It would then pick a new random address to connect to. The normal session timeout will end up closing the session.

  • For the set of open connections also be able to supply the list of stream handlers to start for a newly opened connection.

  • The simple policy uses a configuration list of seed_nodes passed in as part of Take an Options map in swarm:start  #42, and will select a number of (non-stale) nodes from the peerbook and at least one from the list of nodes specified in seed_nodes.

@Vagabond does this capture what we had in mind?

@Vagabond
Copy link
Contributor

Yes, I think this sums it up nicely.

@madninja madninja self-assigned this Mar 22, 2018
This was referenced Mar 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants