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

Why did you remove libuv? #404

Closed
ibsusu opened this issue Jun 25, 2021 · 3 comments
Closed

Why did you remove libuv? #404

ibsusu opened this issue Jun 25, 2021 · 3 comments

Comments

@ibsusu
Copy link

ibsusu commented Jun 25, 2021

Hiya!

I'm just wondering why you removed libuv, no judging, I just ended up in this repo in my quest to integrate the aws cpp s3 sdk into my event loop utilizing server.

Thanks for your time!

@bretambrose
Copy link
Contributor

Unsure what you're referring to here. I recall talk of supporting libuv in order to make the javascript integration more natural but that was two years ago. The aws-c-* library set, by design, has no dependencies outside the control of AWS until you hit the operating system.

Thinking back further, I do vaguely recall that a libuv-based event loop hit a brick wall at some point, but I don't know the details. @JonathanHenson might remember why that effort stalled.

@ibsusu
Copy link
Author

ibsusu commented Jun 25, 2021

Thinking back further, I do vaguely recall that a libuv-based event loop hit a brick wall at some point, but I don't know the details. @JonathanHenson might remember why that effort stalled.

I think that's what I'm referring to. #156

It was ripped out for some reason and I'd just like to know why. epoll and kqueue are used instead so it obviates the need for libuv so it just made me curious what the reasoning was.

@JonathanHenson
Copy link
Contributor

JonathanHenson commented Dec 12, 2023

The threading model was incompatible. Also libuv is level-triggered and that detail permeates the rest of the API. The common runtime uses an edge-triggered model and they weren't compatible without a lot of complexity and overhead. Technically libuv is still used by V8 and the CRT shunts data over to it to interact with javascript.

Furthermore, implementing back-pressure was particularly messy since it's not a concern libuv ever assumes given the js threading model and the library's memory model. We still had libuv loops for interacting with js, but the napi added additional async support and we were able to use that instead and eventually were able to completely remove it.

@jmklix jmklix closed this as completed Dec 12, 2023
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

4 participants