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

reusable circuits #7

Open
ghost opened this issue Mar 14, 2022 · 0 comments
Open

reusable circuits #7

ghost opened this issue Mar 14, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 14, 2022

If you broadcast messages to multiple peers and receive a response, you might want to send additional messages to the same peer through the same intermediaries, saving bandwidth so that follow-up requests do not need to do a flood-fill up to N hops. This branch adds a circuit_id field to requests and responses:

https://github.com/cabal-club/cable/tree/circuit_id

Peers responding to requests can set a circuit_id so that the requesting peer can reach them by the same route. Peers between a requester and responder can keep a routing table mapping circuit ids to a peer connection to send replies along so that messages with the same id do not need to be broadcast on all connections.

Circuits are not intended to be durable or long-lasting. Once a peer disconnects, all circuits on that interface can be forgotten. Peers keeping a circuit table might remember only a fixed number of circuits for each connection, vacating circuits not recently used for circuits more recently used.

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

No branches or pull requests

0 participants