-
Notifications
You must be signed in to change notification settings - Fork 2
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
Separate connection scheduler, dialer and address book #72
Comments
Thinking about a simple address book implementation... I do like the simplicity of the current For the sake of separating the scheduler, dialer and address book, it would be helpful to be able to retrieve an address for a given public key. The simplest implementation might be: struct AddressBook(HashMap<PublicKey, Address>); Eventually, we might want to support multiple addresses per public key (e.g. a hostname, a local IP and a yggdrasil IP). We would then require some logic to select or prioritise one address over another. Or we could simply dial each address in turn until a connection was successful. Allowing multiple addresses per peer will require a rethinking of |
Hello 👋 Am right thinking peers in
This would be a really cool feature to support in the future! |
Hey! 👋🏻
That's correct. For now, addresses have to be provided for peers by the node operator. In the future I'd like to store addresses learned through inbound connections. Scuttlebutt has historically used a |
In the current iteration of the connection scheduler, the scheduler knows the public key and address of each peer to be dialed and the dialing is initiated from within the scheduler.
With the aim of eventually replacing the scheduler with a generic version that can be shared between projects, it may be best to limit the scheduler's knowledge to just the public key(s) and to execute the dialing from another actor. In this approach, the scheduler would simply emit an event to convey the message: "Please dial XYZ peer now", where
XYZ
is a public key in the case ofsolar
. The dialer would listen for that message, query the address book to retrieve an address for the peer and execute the outbound dial attempt.The text was updated successfully, but these errors were encountered: