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

asyncio vs libuv #23

Open
bontric opened this issue Apr 14, 2016 · 5 comments
Open

asyncio vs libuv #23

bontric opened this issue Apr 14, 2016 · 5 comments

Comments

@bontric
Copy link
Collaborator

bontric commented Apr 14, 2016

In #8 we were talking about moving to libuv for asynchronous I/O instead of using threads and processes.

Looking into this I found the libuv implementation for python (pyuv). Sadly, the project is only maintained by one person and also adds an additional dependency to this project.

Checking for alternatives I found that python (> 3.3) has a built in library for Asynchronous I/O. Since I haven't really looked into the details of asynchronous I/O yet, I can't estimate how appropriate this is for our project. I also can't say how it differs from libuv..

@stze could you maybe take a quick look at asyncio and tell me if I should use this? Or do you think using pyuv is the better option?

This was referenced Apr 14, 2016
@stze
Copy link
Collaborator

stze commented Apr 14, 2016

please stick to pyuv (i seems well maintained and is also widely used). it's the better option in my opinion because i don't know asyncio lib very well and i think pyuv is easier to use.

@mkind
Copy link
Member

mkind commented Apr 14, 2016

I don't know neither. The additional dependency for pyuv does not hurt, I think. However, if asyncio provides the desired platform portability, it might be ok to use that.

@stze
Copy link
Collaborator

stze commented Apr 14, 2016

i think its not important which library. neovim python client has support for both event loop types 1, so @bontric you can decide ;).

@bontric
Copy link
Collaborator Author

bontric commented Apr 14, 2016

I've been looking more into this but couldn't find a proper comparison of pyuv and asyncio. The only thing I did find is a talk by the creator and maintainer of pyuv about asyncio.

The cool thing about asyncio, for me, is that it's built in and also provides built-in features at least for python version 3.5+ . Another bonus is guaranteed support in the future.

We don't provide support for python2 versions and I don't think we need to support python 3.x (x<5) versions either. (There is a backport for earlier versions though)

@bontric you can decide ;)

Since I haven't really looked into libuv yet, I'd go with asyncio fo the sake of compatibility. I think having as few dependencies as possible is a good thing. That is my personal opinion though..

I also do not have a good understanding of the core concepts of asynchronous I/O yet. Therefore I can't really make an informed decision on which of the two is better.. I'll try to get more into this and make an informed decision as soon as possible.

@stze
Copy link
Collaborator

stze commented Apr 14, 2016

The cool thing about asyncio, for me, is that it's built in and also provides built-in features at least for python version 3.5+ . Another bonus is guaranteed support in the future.

you are totally right. maybe it's good to stick with a built in library.

We don't provide support for python2 versions and I don't think we need to support python 3.x (x<5) versions either. (There is a backport for earlier versions though)

correct, python2 support isn't needed.

@bontric you can decide ;)

Since I haven't really looked into libuv yet, I'd go with asyncio fo the sake of compatibility. I think having as few dependencies as possible is a good thing. That is my personal opinion though..

yes, in my opinion it's also good to keep the external library footprint as small as possible, but if asyncio has disadvantages i would prefer pyuv

I also do not have a good understanding of the core concepts of asynchronous I/O yet. Therefore I can't really make an informed decision on which of the two is better.. I'll try to get more into this and make a more informed decision as soon as possible.

i think both libraries have the exact same purpose, that's why i posted the neovim link earlier, they use asyncio if pyuv is not available on the system, a sign that they do exactly the same. an evaluation about which library will perform better isn't an easy task, so i would say, just use your preferred one if you don't find arguments against one of both.

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

3 participants