-
Notifications
You must be signed in to change notification settings - Fork 24
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
Try to implement an async version #37
Comments
asyncio
version
First try to implement an asyncio server is a success, using Here are the tasks to implement the asynchronous server:
For an asynchronous client:
|
The first version of the asynchronous request handler has been pushed on the A draft of documentation have also been pushed, with a snippet to start the server with aiohttp. |
And I finally found the time to make an The usage is pretty straightforward: you just need to use The dependency on Documentation and unit tests are still to be written. Please comment with to this issue if you try the asynchronous mode and find good or bad. |
Protocol unit tests from the synchronous client and server are now also applied on their asynchronous versions. Next steps will be:
|
I've also added some type hints and potentially fixed a bug in the class converter (when copying the Documentation is still a draft, available as the |
It would be interesting to implement an
asyncio
-based version of the library, as it undeniably increases performances in most I/O cases.This would require a big refactoring of the project, in order to share as most code as possible between the sync & async versions of the transport and protocol layers.
It is necessary to decide if the project will depend on a third-party library to handle this or if it will use the Python 3.4+ API & syntax.
Note: the library has to stay compatible with Python 2 (at least for some years), which means all of the Python 3 syntax would be in a specific module, loaded when possible.
You can vote for or against this proposal.
The text was updated successfully, but these errors were encountered: