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

Stream pooling #271

Closed
wants to merge 3 commits into from
Closed

Stream pooling #271

wants to merge 3 commits into from

Conversation

anacrolix
Copy link
Contributor

This is an alternative to #92 and #167. It avoids negotiating new streams if there are idle ones, and creates new ones if all current streams are in use. It handles stream failures synchronously, so no notification handling is required. It avoids having to wait for previous requests to complete, and issues with timeouts invalidating streams. It also handles "send-only" messages; arbitrary messages received are detected.

It's a draft, and contains a lot of debugging code still.

@ghost ghost assigned anacrolix Feb 20, 2019
@ghost ghost added the status/in-progress In progress label Feb 20, 2019
Copy link

@jhiesey jhiesey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely an improvement over the current design, and a good compromise to avoid the complexity of the pipelining patch.

pool_stream.go Show resolved Hide resolved
@anacrolix anacrolix closed this Mar 7, 2019
@ghost ghost removed the status/in-progress In progress label Mar 7, 2019
@anacrolix anacrolix changed the base branch from dht-tool-methods to master March 7, 2019 02:08
@anacrolix
Copy link
Contributor Author

GitHub has decided this PR can't be reopened due to my removing dht-tool-methods. I'll open a new PR soon. Thanks for the initial feedback.

@anacrolix anacrolix mentioned this pull request Mar 7, 2019
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

Successfully merging this pull request may close these issues.

2 participants