criu
libuv
criu | libuv | |
---|---|---|
14 | 75 | |
2,663 | 23,276 | |
1.7% | 0.8% | |
8.9 | 9.0 | |
10 days ago | 9 days ago | |
C | C | |
GNU General Public License v3.0 or later | MIT License |
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.
criu
-
When "letting it crash" is not enough
Checkpoint/Restore I feel is a bigger concept than just saving state. At the zeroth level it's a system that can correctly stop and serialize a running process (as criu https://github.com/checkpoint-restore/criu has shown is a huge pain in the ass to still not be perfect) in a way that can initiated from within the process itself.
The 1st level more-work-but-easier way to do this is to build or use a heavily constrained VM/language you run from within your main application that doesn't allow for most of the hard problems to even exist.
I can't find any ready-made tools to do this that I wouldn't consider an endeavor.
- CRIU – Checkpoint/restore Linux tasks
-
Live Switching Pods to another Node on Resource Limits
That being said the Checkpoint Restore In Userspace project has been around for a number of years and is the closest thing to what you are talking about: taking a linux process on one machine and moving it to another. It is messy but can be done in some cases. There are folks looking at how to integrate CRIU with k8s but it’s all research at this point.
- Criu: Checkpoint/Restore Functionality for Linux
- checkpoint-restore/criu: Checkpoint/Restore tool
- checkpoint-restore/criu: Linux Checkpoint/Restore tool
-
The intersection of shadow stacks and CRIU
I would love to make more use of CRIU. E.g. I considered to use CRIU for my Python preloaded logic (https://github.com/albertz/python-preloaded). Unfortunately, at that point in time, CRIU must be used with root access, which was not an option. However, I see that the PR was merged now, so maybe it works now? (https://github.com/checkpoint-restore/criu/pull/1930)
There is also DMTCP (https://github.com/dmtcp/dmtcp/) but this might have other problems for my use case.
My solution was to use a fork server instead, which works almost equally well. There are not really much downsides with this approach. And this is actually quite simple, and also quite cross-platform (except Windows).
-
Python Preloaded
CRIU currently needs root access for dump/restore. However, there is ongoing work to support a non-root option in https://github.com/checkpoint-restore/criu/pull/1930.
-
How-to "freeze" a process to disk?
There have been multiple checkpointing attempts over the years. Criu is the only one I know of that's still kicking. That's probably your best and only bet.
- I made a plugin to suspend games and apps similar to how consoles do (Deck Suspender)
libuv
- Epoll: The API that powers the modern internet (2022)
-
APIs in Go with Huma 2.0
I wound up on a different team with pre-existing Python code so temporarily shelved my use of Go for a bit, and we used Sanic (an async Python framework built on top of the excellent uvloop & libuv that also powers Node.js) to build some APIs for live channel management & operations. We hand-wrote our OpenAPI and used it to generate documentation and a CLI, which was an improvement over what was there (or not) before. Other teams used the OpenAPI document to generate SDKs to interact with our service.
- Python Is Easy. Go Is Simple. Simple = Easy
-
Notes: Advanced Node.js Concepts by Stephen Grider
In the source code of the Node.js opensource project, lib folder contains JavaScript code, mostly wrappers over C++ and function definitions. On the contrary, src folder contains C++ implementations of the functions, which pulls dependencies from the V8 project, the libuv project, the zlib project, the llhttp project, and many more - which are all placed at the deps folder.
- A Magia do Event Loop
-
A complete guide to the Node.js event loop
Libuv, the C library that gives Node.js its asynchronous, non-blocking I/O capability is responsible for managing the thread pool. Node.js gives you the capability of using additional threads for computationally expensive and long-lasting operations to avoid blocking the event loop.
-
What is Node.js?: A Complete Guide
Node.js is written in C, C++, and JavaScript. The core components of Node.js - the V8 engine and the libuv library - are written in C++ and C, respectively, since these languages provide low-level access to system resources, making them well-suited for building high-performance and efficient applications. JavaScript is mainly used to write the application logic.
-
Node v20.3.0 (Current) upgrade to libuv 1.45.0, including SIGNIFICANT performance improvements to file system operations on Linux
x8 apparently https://github.com/libuv/libuv/pull/3952
-
Node.js – v20.3.0
Notably upgrades to libuv 1.45 which has io_uring support. Faster file system access! Awhh yeah, it's on.
Remarkable what a mild & unintrusive PR adding io_uring was. https://github.com/libuv/libuv/pull/3952
-
Using Parallel Processing in Node.js and its Limitations
Well, the single-threaded nature ultimately leads to its biggest downfall. Node.js utilizes a synchronous event loop engineered using Libuv that takes in code from the call stack and executes it.
What are some alternatives?
nyrna - Suspend games and applications.
libevent - Event notification library
FitM - FitM, the Fuzzer in the Middle, can fuzz client and server binaries at the same time using userspace snapshot-fuzzing and network emulation. It's fast and comparably easy to set up.
Boost.Asio - Asio C++ Library
Regshot-Advanced - This is a fork of Regshot (original found at https://sourceforge.net/projects/regshot/) with very enhanced functionality.
libev - Full-featured high-performance event loop loosely modelled after libevent
fpart - Sort files and pack them into partitions
tokio-uring - An io_uring backed runtime for Rust
DashLoader - Launch at the speed of light.
uvw - Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
nginx-link-function - It is a NGINX module that provides dynamic linking to your application in server context and call the function of your application in location directive
C++ Actor Framework - An Open Source Implementation of the Actor Model in C++