libev
libuv
Our great sponsors
libev | libuv | |
---|---|---|
3 | 32 | |
1,267 | 19,467 | |
- | 1.5% | |
0.0 | 9.1 | |
over 1 year ago | 3 days ago | |
Shell | C | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
libev
- Ship it!
-
C in Web Dev
Also, libev
-
Ideas, thoughts, and notes on an action based polymorphism pattern for C
It's done even now. See ev.h where they do this. Just that you disable GCC's aliasing warning. There's a reason why restrict and aliasing became important to deal with. It wasn't standards that killed it.
libuv
- Libuv - Cross-platform asynchronous I/O
-
A peek into the beam
[11] node io: https://github.com/libuv/libuv
-
Go Vs Nodejs in terms of Http server performance. Who delivers the higher number of concurrent requests?
In terms of requests you talk about libuv is C++ https://libuv.org which is build-in to node and can be used in Go as well. So there is literally no reason to compare them on a this basis.
-
Building a docker image for a Go programm
There are just enough differences between musl and glibc to be confusing, e.g. https://github.com/libuv/libuv/issues/2225
-
When did Windows start letting you open ISOs without mounting them as a CD first???
I just upgraded to Win10 a few months ago, mostly because libuv maintainers are pricks and once they broke it, every dependent software (which is "almost everything") suddenly didn't support Win7 either.
-
Node.js Roadmap for Beginners
Node.js is using a C library called libuv to implement the Event Loop. I think every developer should also know about it and have a basic understanding about this difference to avoid some mistakes in future.
-
Is IO async?
Having said that, know that MoarVM is using the libuv library for its IO needs. And my understanding is that its IO is asynchronous.
-
Non blocking write to a file
If you want real non-blocking IO, the C standard library doesn't support this and the OS-specific APIs tend to be difficult to use (and non-portable), so I would recommend something like libuv.
-
Ask HN: Where are the resources for complex architectures for Node.js?
My biggest pointer would be to remember that Java & JavaScript aren't named that way by coincidence. They're two different approaches to a similar problem. Java suffers from Enterprise Development (eg: Enterprise FizzBuzz[0]), JavaScript suffers from Ultimate Accessibility (eg: how many questions on Stack Overflow conflated jQuery and JS?).
> How should exceptions be managed? [...] Has there been a debate about best practice? Where can I find it?
I suggest you handle the errors you can and otherwise let it crash.[1][2] Debates in NodeJS-land have steered towards more monadic/Result-like structures and working synchronous-looking try/catch onto async/await. NodeJS and its various components are open source, you'll have a lot of luck looking around on GH for issues & PRs related to a feature -- same for the language, ECMAScript[3] officially.[4]
Since you mentioned Clojure, have you looked at ClojureScript?[5] That may be a good entry to JS authors & articles you'd enjoy.
> I have the impression that NodeJS is a bit more magical than the JVM [...] Is that correct? Where are good resources on this subject?
As other replies have mentioned, you're really talking about V8[6] for the "JSVM" executing that code. A thing I've seen throw some people for a loop is how minimalist the specification actually is.[7] The magic in NodeJS is certainly from V8 and the rate of optimizations there but also libuv,[8] what actually powers the infamous event loop.
Hope that helps!
[0]: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
[1]: Borrowing from Erlang, see Making reliable distributed systems in the presence of software errors, Joe Armstrong, page 104 "Error Handling Philosophy" https://erlang.org/download/armstrong_thesis_2003.pdf
[2]: _Most_ kinds of errors will cause the process to crash if you don't handle them, https://nodejs.org/dist/latest-v16.x/docs/api/errors.html . Promise rejections don't (yet) though it emits an error, and callback-based APIs will always consist of an [error, data] tuple for the arguments
[3]: https://github.com/tc39/proposals
[4]: Because Oracle owns the trademark, of course: http://tarr.uspto.gov/servlet/tarr?regser=serial&entry=
[5]: https://clojurescript.org/
[6]: https://v8.dev/docs
[7]: "ECMAScript as defined here is not intended to be computationally self-sufficient; indeed, there are no provisions in this specification for input of external data or output of computed results. Instead, it is expected that the computational environment of an ECMAScript program will provide not only the objects and other facilities described in this specification but also certain environment-specific objects, whose description and behaviour are beyond the scope of this specification except to indicate that they may provide certain properties that can be accessed and certain functions that can be called from an ECMAScript program." https://tc39.es/ecma262/#sec-overview
-
Introduction to NodeJS
Node uses Libuv as the event loop implementation. To use a Node asynchronous API, you pass a callback function as an argument to that API function, and during the event loop, your callback is executed.
What are some alternatives?
libevent - Event notification library
Boost.Asio - Asio C++ Library
uvw - Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
C++ Actor Framework - An Open Source Implementation of the Actor Model in C++
benchmarks - Some benchmarks of different languages
mandrake
librespot - Open Source Spotify client library
ncspot - Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes.
rotor - Event loop friendly C++ actor micro-framework, supervisable