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

Upgrade to OpenSSL 0.9.x #59

Closed
wants to merge 19 commits into from
Closed

Upgrade to OpenSSL 0.9.x #59

wants to merge 19 commits into from

Conversation

grahamc
Copy link
Contributor

@grahamc grahamc commented Nov 12, 2017

Closes:

It isn't ideal, the 1s read timeout can slow things down a bit. But: It didn't take much to implement this, and lets me use a recent openssl. I'd be happy to fix it if you have any suggestions on how :)

Basically creates a new syncsender / reader for writes, and the "reading loop" also handles writes now.

This code is definitely POC. If you like it, I would like to clean it up for inclusion.

@Antti
Copy link
Owner

Antti commented Nov 13, 2017

Thanks for the PR!
I was trying to figure out if there was any way to upgrade this crate to support new openssl, and this approach was also considered. The problem with this is that it emulates async IO with timeouts, which is very resource consuming and slow (especially writes, since it needs to wait for read to timeout.
And now I'm not sure that there is any easy way to upgrade to new openssl without doing an async rewrite of the client crate.

@grahamc
Copy link
Contributor Author

grahamc commented Nov 13, 2017 via email

@Antti
Copy link
Owner

Antti commented Nov 14, 2017

@grahamc I started rewriting this project using tokio, but at that time tokio was changing/breaking things every week or so and I stopped.
You can have a look at this project lapin, which was initially written with async support in mind.

@grahamc
Copy link
Contributor Author

grahamc commented Jan 13, 2018

Unfortunately Lapin and a Futures based mechanism is really not an appropriate approach for my use case, so I'm just fighting the losing battle of making this work. The latest commit will send many writes before attempting a read, this seems to make it more likely that a frame is ready to be read and seems to improve throughput.

The AMQP library cannot appropriate handle failures in either of these
cases. It is easy for a channel's SyncSender to become full of
NO_ROUTE messages due to mandatory delivery failing. This effectively
causes a deadlock of the client.
@grahamc
Copy link
Contributor Author

grahamc commented Jan 26, 2018

I'm going to close this PR since it is off my master branch, which is a bit junky and not really PR worthy. I've submitted PRs for non-SSL improvements out of this branch, though.

@grahamc grahamc closed this Jan 26, 2018
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