This is really cool! Why would we look at this over, say, Hydra or eka-ci? Anything in the project you’re particularly proud of? Fun bugs you fixed during development?
When comparing Hydra vs Gradient. You’ll find that Gradient has way better Integrations and UX. It is a CI made for Teams, and every Design decision was made to create something People like to use and not only have to use, because there is no better alternative.
Gradient uses a zero-copy Protocol via websockets to connect to its Workers, not SSH. But you can configure Gradient remote builder on your PC, which then connects to the Gradient Server to build stuff.
It isn’t strictly faster because of the Protocoll (eventhough not needing to searialize and deserialize in Memory helps). Gradient is simply faster because Evaluation and Builds run concurrently and each Build is beeing scored against Workers, minimizing Network Traffic.
The Real benefit comes from not having to worry about OOMs, if Gradient sees that no Worker currently has enough CPU or RAM it simply wont dispatch Jobs to that worker. In other Words Gradient does CPU Maxxing.
No other Nix Build System can do one of the things mentioned currently.
In tests we could bring build times down from 30 Minutes (Hydra) to only 9 Minutes with Gradient.
Also it’s recommended to Tune Eval Speeds and enable build.metrics = true; (please look at the nix code on what it changes first) on Workers for the full Performance.
You forgot to mention that it no longer hugs to death your self hosted S3, you can restart single builds, scheduling tries to estimate resource usage based on past builds and the nice progress bars that make it clear what (substituting, uploading, …) is happening right now.
We have been running Hydra for years and sometimes it looked like it wasn’t really doing something or we didn’t know where to look. With the gamified UI we have been CI watching the last weeks and seeing what is happening in the system.
I think the funniest bug we had the longest time, was that it tried to build clang over and over again despite being done with the final package already.
I’m seeing several implementations and iterations of new builder and store protocols (they tend to be grpc). I think it would make sense to consolidate some of these efforts and standardize?
There are multiple Reason why Gradient isn’t using gRPC. Evaluation over a Protocol is a time critical and bandwidth critical Process, and everything needs to be asynchronous. Further more I usually had a bad experience getting things upstream in nix, adding features. I am not blaming anyone, because I know there are a lot of PRs, but it often seams like things only get merged once well known in the nix space has a interest in merging additions. I took almost a year to get fixes for the nix-daemon upstream. Thus I can’t sadly rely on others motivation to improve the Nix C-API and gRPC / nix-daemon protocol implemention. I am happy to continue making contributions, if they would get merged in reasonable time frame (not years).
Gradient Proto supports both directions, but usually a Worker connects to a Server. A special case for example are the gradient.ci servers, where the e.g. Your own Gradient Instance initiates the connection to the Worker (servers.gradient.ci).