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

move sewer to asyncio #114

Open
komuw opened this issue Mar 3, 2019 · 3 comments
Open

move sewer to asyncio #114

komuw opened this issue Mar 3, 2019 · 3 comments

Comments

@komuw
Copy link
Owner

komuw commented Mar 3, 2019

most of the things that sewer does are network IO related(making api calls to letsencrypt, making other calls to DNS providers etc)

This is precisely the kind of work that python3's asyncio really shines at.

I've had some experience now working with asyncio and it is awesome;
naz: https://github.com/komuw/naz :: an async SMPP client
wiji: https://github.com/komuw/wiji :: an upcoming async distributed task processor.

probably also release a new major version because if we are going to so asyncio, we better do it with python3.7+ and that may be a breaking change for some.

And if we are doing a major version with breaking changes and some async goodness, we might as well also do: #91 DNS changes )

@mmaney
Copy link
Collaborator

mmaney commented Feb 1, 2020

I'm not sure what asyncio would buy sewer, unless you were processing a bunch of separate requests in parallel (which the cli certainly doesn't support). Given how much the API forces sequential access (must get nonce in order to post this, another nonce in order to poll for completion of that, etc.), using request's session to make best use of persistent connections might be of more value. It would at least get rid of the User-Agent repeated for every request.

Caveat: I haven't used either asyncio or requests much before I fell into working on getting rfc8555 working here. :-)

@komuw
Copy link
Owner Author

komuw commented Feb 3, 2020

yeah, there maybe are more lower hanging fruits.
asyncio would make a lot more sense if someone wanted to batch certificate requests for different domain names.

@mmaney
Copy link
Collaborator

mmaney commented Feb 4, 2020

Heh, I was going to say something about batching being the one likely use case for this. Also that making sewer more parallel might push rate limits [harder].

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

2 participants