The Shepherd is an init system and process manager initially built for GNU Hurd and now used by Guix. It can run with either root or user privileges to launch daemons, execute tasks, and manage processes. As we’ve discussed previously, Spritely has been working to port the Shepherd to Goblins. We’ve been a bit quiet since that announcement, so what’s the buzz?
First, as a quick refresher, the Shepherd is a great project to port to Goblins because it’s already built on the actor model. By switching to Goblins, we can bring the following benefits to the project:
- Streamline the codebase by replacing the Shepherd’s ad-hoc actor model implementation.
- Reduce the likelihood of concurrency bugs caused by the existing actor model implementation that exposes too much of its CSP foundation using Fibers.
- Transform services (and other actors) into object capabilities for fine-grained management of privileges, which will (eventually) make it to possible to unify the currently separate worlds of “system” Shepherds that run as root under PID 1 and “user” Shepherds that run as an unprivileged user.
- Enable Shepherd to use the Object Capability Network (OCapN) to open the door for distributed networks of “Communicating Shepherd Processes” in the future.
Since our last post, we’ve done the following:
- Wrote Goblins versions of the core actors like the service controller, service registry, and process monitor.
- Added unit tests for all of the core actors (there were none before).
- Rewrote the public API as a compatibility layer on top of a new Goblins actor API. This new API is private for now.
What this means is that all of the extant Shepherd functionality will soon be available in the Goblins port. We’re currently working out the remaining sneaky, tricky, subtle bugs in order to have a full 1:1 port that passes the existing test suite. We’re getting very close, so we felt it was time to share this update!
Christine of ActivityPub and also one of the lead developers of Spritely: https://en.m.wikipedia.org/wiki/Christine_Lemmer-Webber