More than membership; not yet a production control plane
- Landed on both kernels: Phase 1 SWIM-style membership and failure detection over UDP, proven by repeatable C++↔C++ and C++↔Rust two-vessel conformance runs.
- Landed on C++: a first-class
Service, dedicated level-triggered local reconcile loop, restart policy, and crash-loop guard; plus deterministic-primaryClusterSingletonplacement with a cross-vessel failover demo, self-test, and host harness. - Partial on C++: signed placement grants, privileged fail-closed installation, mirrored durable roster/placement epoch floors and revoke tombstones, reconcile admission, and monotonic-deadline demotion. This is the authority-install half, not an end-to-end fence.
- Not proven or not built: a real workload in cross-vessel or panic-recovery failover; JefeRust service/reconcile/placement parity; CP quorum consensus; authenticated gossip; resource-side epoch fencing; the two-boot and two-vessel authority proof;
desired_replicas > 1; service addressing; fleet observability; migration; and the JSL-2 isolation cell.
1.The thesis & the inversion
Today's industry stack is OS → container runtime → orchestrator, where the orchestrator (Kubernetes, Nomad, Borg, OpenStack) is an external control plane doing scheduling, replication, health-checking, failover, and autoscaling against an OS that knows nothing about the cluster. Xylem inverts that: it folds the control plane into the kernel.
A "service" becomes a first-class kernel object carrying a desired replica count and a supervision policy. Redundancy, scaling, and failover become kernel verbs — not YAML reconciled by an outside controller.
The arborist vs. the tissue
The name is the plant tissue. Xylem is a distributed transport and support network spanning the whole organism, redundant by construction: when a vessel cavitates (a local failure), flow reroutes around the dead vessel — built-in failover as a structural property. It regrows each season (self-healing / self-scaling) and it is load-bearing (structural).
| External control plane (status quo) | Control plane in the kernel (Xylem) | |
|---|---|---|
| Where the cluster's intelligence lives | A separate distributed system (etcd + controllers, Raft servers, a Borgmaster, a daemon mesh) | The kernel itself |
| What the OS knows about the cluster | Nothing — it schedules processes | The target is native service and cell lifecycle across vessels |
| How failure is learned | kubelet watch → API server → controller (network hops, sampled, stale) | Local task state is direct, then acted on by the reconcile pass; cross-vessel death follows SWIM probe and suspicion timers |
| Redundancy / scaling / failover | Verbs of the external orchestrator | Verbs of the kernel |
There is no control plane to bolt on — but that does not delete the distributed-systems work. It relocates it into ring 0. Folding the control plane into the kernel moves the complexity; it does not make it vanish (see §7).
2.Why JefeOS, why now
JefeOS needs an identity that differentiates it from "yet another hobby Unix clone." The owner's decision is to be a natively-clustered OS — self-redundant, self-scaling, failure-resistant — chosen because it is more fun and less saturated than re-treading POSIX. The practical secondary reason it fits: failure-resistance is already JefeOS's de-facto through-line. The recent engineering culture has been reliability-first without anyone calling it "the cluster story," and that work is exactly the substrate Xylem needs.
| Already-shipped reliability work | What it gives Xylem |
|---|---|
| Panic persistence + next-boot recovery (crash record survives reboot) | Vessel death is recorded and recoverable, not silently lost — the raw material of a supervisor's restart policy |
Fault-survivable syscalls (bad user pointers return -EFAULT instead of crashing the kernel) | A bad cell cannot take the vessel down with it — the isolation that makes "kill and respawn" sound |
| Leak-free process teardown + regression test (6-cycle green, zero free-delta) | Re-replication doesn't leak the fleet to death over time |
| Orphan/zombie reaper in PID-1 | The reap discipline a supervisor needs before it can claim "N healthy replicas" |
Xylem did not wait for the future JSL-2 isolation cell. The first C++ supervision increment operates on a plain kernel task or task-group, which was enough to prove the local reconcile loop and stateless cross-vessel placement. JSL-2 remains a separate future container track: namespaces, cgroups/resource isolation, and OCI lifecycle on JefeOS's own kernel. When that boundary lands, Xylem can supervise it without changing the clustering thesis.
3.JSL ⊥ Xylem — two orthogonal axes that compose at the cell
The single most important conceptual guard-rail in this document: JSL is not Xylem, and calling Xylem a "JSL tier" would be wrong. They are orthogonal axes that compose at exactly one point — the cell.
| Axis | Question it answers | Operates on | Status |
|---|---|---|---|
| JSL (Linux-compat ladder) | "Can JefeOS run Linux software?" | Translated Linux workloads today; future isolation cells | JSL-1 active; JSL-2 proposed |
| Xylem (native clustering) | "Can JefeOS scale and heal itself?" | Plain tasks today; future isolated cells | C++ supervision + failover landed |
JSL is the horizontal axis (run more kinds of software on one vessel): JSL-1 is WSL1-style syscall translation, near-done through Alpine; JSL-2 is native containers, a single-vessel isolation cell. Xylem is the vertical axis (run the same software on more vessels, self-healingly). They meet at the cell:
The intended payoff of keeping them separate is payload independence: once an isolated Linux workload can be registered as a Xylem cell, lifecycle properties belong to JefeOS rather than to Linux. Today the C++ supervisor has demonstrated restart and deterministic-primary failover with its current task recipes; it has not demonstrated migration, N-of-M replication, or a production Linux workload moving between vessels.
4.The Linux-host boundary: translation today, isolation later
JefeOS's Linux compatibility work remains the ecosystem on-ramp, not a competing identity. The current roadmap draws a clear boundary: JSL-1 translates the Linux syscall ABI on the JefeOS kernel; JSL-2 adds native container isolation around that environment. A real upstream Linux kernel in a VM is not the JSL-2 plan.
JSL-1 — translated Linux ABI Landed
JSL syscall translation: SYSCALL → LSTAR →
linux_syscall.cpp, serviced by JefeOS's own kernel. Fidelity is
approximate — bug-for-bug Linux is unreachable. EXISTS today:
this is how Alpine, apk, and real upstream packages (tree,
jq) run under chroot right now. Cheap and incremental, but a
continuing compatibility treadmill against Linux's evolving syscall surface.
JSL-2 — native container boundary Proposed
Namespaces, cgroups/resource isolation, image/runtime lifecycle, and an OCI runtime isolate translated Linux workloads on JefeOS's own kernel. This boundary is absent today and remains gated on the JSL-1 completion criteria and the container primitives themselves.
The existing JSL and Alpine work is therefore reused, not discarded. JSL-2 makes the translated environment isolatable; Xylem supplies a cross-vessel lifecycle above it. That composition is still proposed. The Xylem work that has landed so far deliberately supervises plain tasks and does not claim the future cell boundary.
JSL-1 continues as syscall translation. JSL-2 is future native containerization, not a hypervisor. Xylem does not depend on JSL-2 shipping: its current C++ service and reconcile path already operates on plain task/task-group recipes.
5.Prior art as gold standards, NOT clone targets
We don't want to clone k8s / OpenStack / OpenShift / Nomad / Borg. We use them as gold standards for their use case and build what makes sense for Xylem. Every orchestrator below shares one assumption Xylem deliberately inverts — the cluster lives in an external control plane on top of cluster-blind OSes. We study what each does well and why, then build natively from first principles.
Cluster orchestrators — lessons to inherit, surfaces NOT to clone
| System | Gold-standard lesson for Xylem | Do NOT clone |
|---|---|---|
| Kubernetes | Level-triggered reconciliation — a loop that continuously re-asserts "I want N healthy replicas" is self-correcting against missed events. Declarative desired-state is the right contract. | The external control plane + etcd-as-a-separate-quorum + the enormous declarative API surface. Full k8s API = stated non-goal. |
| Nomad | The "evaluation" as the unit of work + feasibility→scoring split. An orchestrator can be one tight binary — which maps naturally to "in the kernel." | The external 3–5 Raft-server topology + region/datacenter federation + HCL specs. |
| Borg | Replicate the brain (consensus) but let the scheduler run on a cached, loosely-synchronized view; reserve resources as first-class allocs. | The monolithic central Borgmaster as an external service tuned to Google scale + an operational army. |
| OpenStack | A cluster OS must own the substrate — placement is meaningless without an answer for network fabric, storage, and identity. | The "distributed monolith" of many daemons over a shared message bus. JefeOS is an OS, not an IaaS orchestrating other OSes. |
| OpenShift | Opinionated, secure-by-default + a coherent day-2 (lifecycle / upgrade / heal) story is a feature, not bloat. | It thickens the entire k8s external control plane + a large operator/API surface. |
The OS-native resilience lineage — what Xylem inherits
Folding resilience into the kernel is one of the most repeatedly-attempted ideas in systems history, and most attempts died — almost never because the idea was wrong, but because they were beautiful islands with no software: technically superb systems stranded outside the ecosystem gravity well.
| System | What it PROVED | The trap |
|---|---|---|
| MOSIX / Kerrighed / Plan 9 (Single-System-Image) | The cluster can look like one machine — the kernel migrates processes transparently; Plan 9 named resources uniformly via 9P. | The market evaporated, and they cleanly migrated only stateless processes. |
| Erlang/OTP + BEAM | The closest production proof of the thesis: supervision trees, "let it crash," hot code reload, location-transparent messaging running global telecom for decades. | Not an OS (a language island). Distributed Erlang punts split-brain — a human picks the winner on heal. |
| QNX Neutrino (microkernel) | "Failure-resistant + hot-swap" as a shipping commercial reality — restart a crashed driver without rebooting, with ordered multi-stage recovery. | Stayed vertical (automotive/embedded) and proprietary — single-node, no cluster fabric. |
| seL4 / Genode (capability microkernels) | Fault isolation as a first-class, even formally-verified property — kill a component with provably no collateral authority leak. | Proves the isolation primitive; gives no clustering. |
| Unikernels (MirageOS, Solo5) | The disposable cell, demonstrated — boots in tens of milliseconds, immutable, spawn-on-demand. | Sharpest island problem: you must rewrite your app into the library OS. |
The two systems that got furthest — Erlang/OTP and QNX — are precisely the two that mark the boundary. QNX restarts flawlessly on one node; Erlang supervises flawlessly until a stateful store partitions, at which point the best-in-class system stops and asks a human. Stateless cells are tractable; stateful cells remain the hardest boundary — the same place k8s itself bleeds (etcd is a separate Raft cluster precisely because this is the hard part).
6.The architecture, at a high level
Membership and failure detection run on both kernels. The C++ kernel also has local supervision and deterministic-primary singleton placement; the Rust kernel does not. Signed C++ placement authority is a partial safety layer, while N-of-M replication, production consensus and fencing, addressing, observability, migration, and the JSL-2 isolation cell remain open.
| Asset Xylem needs | State today | Used by |
|---|---|---|
| Network stack (TCP / TLS 1.3 / SSH, DNS) | LANDED (single global instance) | Transport and future service discovery |
| Cross-vessel membership + failure detection | LANDED on C++ and Rust; C++↔C++ and C++↔Rust proven | Liveness input; not placement authority |
C++ Service, local reconcile, crash-loop guard | LANDED with same-vessel real-workload supervision in 1.1.0 | Local task restart and bounded recovery |
C++ deterministic-primary ClusterSingleton | LANDED demo/self-test/harness; compiled-in stateless cell only | First cross-vessel failover proof |
| Signed placement-authority installation | PARTIAL on C++; grants, durable floors, fail-closed admission and deadline demotion landed | Authority-required singleton admission |
| JefeRust service / reconcile / placement | ABSENT | Phase-2 cross-kernel parity |
| JSL-2 isolation cell (namespaces + cgroups / OCI lifecycle) | ABSENT | Future isolated payload boundary |
| CP quorum consensus + authenticated gossip | ABSENT | Partition-safe authority and trustworthy liveness |
| Resource-side epoch fencing + two-boot/two-vessel proof | ABSENT | End-to-end stale-writer rejection |
| N-of-M placement, addressing, fleet observability, migration | ABSENT | The remaining distributed control plane |
The cell — the unit Xylem manages
In the full design, a cell is the atom of supervision: a named, isolated, relocatable unit of execution with a declared identity and a supervision contract. Xylem never schedules "a process" or "a container" directly — it schedules cells. That complete isolation object is proposed, not landed. The C++ implementation deliberately started with a plain task/task-group recipe so supervision and placement could advance without inventing the JSL-2 boundary.
Cluster membership — kernels watching each other
Before anything can be redundant, vessels must track who appears alive. The membership table moves peers through alive, suspect, dead, and left states in-kernel rather than relying on an external watcher. Phase 1 uses plaintext, unauthenticated SWIM-style gossip on UDP 7641. That is proven liveness machinery for a trusted lab fleet, not proof that a peer is authorized to place a workload. Production authority remains a separate CP/quorum problem.
Service as a first-class kernel object
A service is the declared thing; its cell is a runtime instance. On C++ this is
now a first-class kernel object with a name, compiled-in CellEntry, restart policy,
desired replica count, and placement policy. A dedicated xylem_super task runs the
level-triggered reconcile loop. The desired count is stored, but only the singleton value
1 is honored today; scaling rules and N-of-M placement remain proposed.
| Fact the loop needs | External orchestrator path | Xylem path |
|---|---|---|
| Real CPU / run-queue load | Scraping cgroup stats over the network | The scheduler's own run queue |
| Real free memory | metrics-server / cAdvisor scrape | The PMM's live free-page count |
| A local task died | Agent watch → API server → controller | Direct task-state inspection by the C++ supervisor |
| A vessel appears dead | Node heartbeat timeout at the API server | Phase-1 membership transition consumed by C++ placement |
Placement authority — partial safety machinery
The C++ kernel can configure a trusted Ed25519 authority key and install short-lived signed placement grants through a privileged, fault-survivable syscall. Mirrored checksummed NTFS records preserve roster floors, per-service placement floors, and revoke tombstones across reboot. Reconcile fails closed when configuration, durable state, signature, scope, time, or grant validity is missing, and a monotonic deadline demotes an expired running service.
The accepted epoch is carried in service and status state, but storage, network sessions, and other authoritative resources do not yet reject stale epochs. A newly created cell can also execute before post-create grant revalidation. Runtime keys and grants must be reinstalled after boot; the two-boot lifecycle and two-vessel witness/partition proof remain open. Authority-required services are therefore limited to stateless/demo use.
Proposed: self-redundancy, self-scaling, live migration
- Self-redundancy is RAID for compute. The target is for
desired_replicas = Nto become an invariant the kernel maintains. When a vessel is marked dead, every cell it hosted would be a deficit, and the reconcile loop schedules replacements onto survivors — honoring anti-affinity so it doesn't recreate the single point of failure. Re-replication must be single-writer through a quorum-backed authority and resource fence. Today only a stateless deterministic singleton is implemented. - Self-scaling could reuse the reconcile model. The proposed design moves
desired_replicasbetween min/max from in-kernel load and memory signals. No autoscaling policy or multi-replica placement exists today. - Live migration could build on per-process page tables. Private address spaces make memory enumeration possible, but the checkpoint format, fd and connection transfer, storage contract, and migration envelope are all absent.
Service addressing / front-door (ABSENT): when a cell respawns on a different
vessel, what address do clients use? Failover is not invisible to clients unless a stable VIP /
DNS-SD record / re-routing front-door sits in front of the moving cells. JefeOS has the DNS
resolver and net stack to build on, but no service-discovery layer exists yet.
Fleet observability (ABSENT): local xylem status and
xylem service views exist, but there is no fleet-wide operator view.
7.The hard problems and current safety boundary
The thesis is seductive; the discipline this section imposes is the price of the differentiator. Every hard problem k8s has, Xylem also has — now inside ring 0, where bugs are panics instead of crash-looped pods.
| Hard problem | Where it bites Xylem | Current posture |
|---|---|---|
| Consensus and placement authority | SWIM liveness cannot authorize a singleton owner. A production authority needs a quorum commit path without turning a stall into a ring-0 wedge | Signed-grant verification and installation are partial; no CP quorum consensus is implemented. Current direction favors a userspace coordinator/witness, with Titan usable only as a 1-of-1 lab witness |
| Split-brain / partitions | The deterministic-primary rule cannot distinguish death from partition. Both sides may host the singleton; transient dual-hosting also occurs while two joining clusters converge | Accepted only for the stateless Phase-2 demo. A quorum-backed grant plus resource-side epoch fence must make the minority stop before stateful or externally authoritative use |
| Forced demotion | Unauthenticated gossip lets an on-subnet attacker advertise a fabricated lower vessel id, causing legitimate deterministic primaries to demote and potentially drive the service to zero | Known Phase-2 denial-of-service risk. Requires authenticated membership plus CP placement authority; no production ClusterSingleton is claimed |
| Resource fencing | A valid spawn decision does not stop an old owner from continuing to write through storage or network sessions after ownership changes | The epoch is assigned and carried, but resource-side durable floors are absent. Spawn admission alone is not fencing |
| Stateful cells | "Maintain N replicas of Postgres" needs quorum writes, per-shard leader election, conflict resolution — replicated storage Xylem does not have | Stateless cells first; stateful cells explicitly deferred, likely needing an external or replicated store |
| Security / cross-vessel multi-tenancy | A compromised vessel can lie in unauthenticated gossip; a future checkpoint could expose a cell's address space in transit | Vessel ids derive from SSH host keys and placement grants are signed, but gossip is not authenticated. Trusted fleet remains an assumption, not an achieved security boundary |
| CAP realities | Pervasive: membership, re-replication, scaling all make an implicit CAP choice | Make it explicit and uniform: Xylem is CP for authoritative actions. Eventual/AP only for non-authoritative liveness gossip |
8.The proof-of-thesis MVP — two-vessel failover
The first end-to-end demonstration of the thesis is now landed on the C++ kernel:
Two JefeOS C++ vessels. Both register the same compiled-in, stateless
ClusterSingleton recipe. The lowest live vessel_id hosts its one
cell; the other remains standby. Power off the primary. After membership
marks it dead, the survivor becomes deterministic primary and starts its own local copy
— with no external orchestrator in the placement loop.
- Landed evidence: an in-kernel non-hollow failover self-test and
tests/xylem-failover-conformance.ps1assert primary-hosts/secondary-standby, power off the primary, and verify survivor promotion and local placement within the membership death bound. - Cross-kernel evidence stops at membership: the reusable Phase-1 harness is
green for C++↔C++ and C++↔Rust, but JefeRust has no
Service, reconcile, or placement layer, so the failover demonstration itself is C++↔C++. - Scope: this is a compiled-in demo cell, not a migrated process, N-of-M replacement, or production workload. There is no client front-door, CP quorum, authenticated gossip, or end-to-end stale-writer fence.
The mechanism and its repeatable demo harness are real. A real production workload surviving vessel loss or kernel panic has not been demonstrated, and the authority path still needs its two-boot and two-vessel witness/partition proof. Those are release-grade evidence gates, not details this whitepaper treats as implied by the demo.
9.Phased roadmap (reliability-first sequencing)
Xylem remains a long arc, but its first control loop is now real. Each phase is gated and testable; the dev loop stays reliability-first throughout (a wedge or regression always preempts Xylem work). Effort figures are deliberately omitted — this is a direction, not a schedule, and distributed systems resist estimation.
- Phase 0 — Isolated cell Proposed JSL-2 namespaces, cgroups/resource isolation, and OCI lifecycle remain a separate future track. They are not a prerequisite for the current plain-task supervisor.
- Phase 1 — Kernel membership ✓ Landed SWIM-style membership and failure detection over UDP run on both kernels. Repeatable two-vessel C++↔C++ and C++↔Rust conformance is green. Traffic remains plaintext and unauthenticated, so this is trusted-fleet liveness, not placement authority.
-
Phase 2 — C++ service supervision + singleton failover ✓ Landed
First-class
Service, dedicated local reconcile loop, restart policy, crash-loop guard, and deterministic-primaryClusterSingletonplacement have landed on C++. The cross-vessel demo/self-test/harness is green. Rust parity,OnFailureexit-code semantics, N-of-M placement, and production workload/panic-recovery proof remain open. - Phase 3 — CP authority + end-to-end fencing Partial C++ signed-grant verification/install, mirrored durable epoch floors, fail-closed admission, and deadline demotion have landed. Production quorum consensus, authenticated gossip, resource-side epoch rejection, and the two-boot/two-vessel witness proof have not.
- Phase 4 — Service addressing + fleet observability Proposed A stable front-door so a client reaches a moved service, plus a fleet-wide operator view. Local status/service commands exist; VIP/DNS-SD and fleet aggregation do not.
- Phase 5 — Live migration Proposed Checkpoint / ship / resume a stateless, connection-light cell — drain a vessel without killing the workload. Gate: connection/fd migration needs absent per-netns + shared storage.
-
Phase 6 — N-of-M placement + autoscale Proposed
Honor
desired_replicas > 1with anti-affinity, then move it between min/max on in-kernel load/memory signals with hysteresis. - Phase 7 — Stateful cells (last, hardest) Proposed Durable replicated state. Gate: likely needs an external or replicated storage substrate; explicitly the longest and highest-risk phase.
The current boundary is a stateless singleton on a trusted lab fleet. Signed-grant admission advances the CP story, but only quorum-backed authority plus resource-side epoch enforcement can close split-brain for authoritative work. Stateful cells remain the last and hardest phase.
10.Design decisions / direction
These are the current implementation boundaries and design directions. The table distinguishes direction from shipped mechanisms:
| Question | Resolution |
|---|---|
| Linux-host boundary | JSL-1.x continues syscall translation. JSL-2 is future native containerization on JefeOS's kernel (namespaces, cgroups/resource isolation, OCI lifecycle), not a Linux-kernel VM. Xylem's current supervisor does not wait for JSL-2. |
| Liveness vs authority | SWIM-style gossip is chosen and landed for liveness. It does not authorize placement. The Phase-3 direction separates a userspace coordinator/witness and signed grants from the kernel verifier; a production quorum commit path and resource fence remain open. |
| Stateful-cell substrate | The roadmap supports both: an external replicated store (pragmatic — start here) and eventual kernel-native replicated storage. |
| Security / multi-tenant model | The current deterministic-primary demo assumes a trusted fleet and stateless workload. Signed authority is partial hardening, not a claim of authenticated membership, partition tolerance, or end-to-end fencing. |
11.Open & breakout items
The remaining work is concrete and separable:
Authority, quorum & membership authentication
Keep SWIM for liveness, but authenticate it. Build a real quorum commit path behind the signed-grant authority so a partition cannot authorize both sides or forged gossip cannot force every legitimate vessel to demote.
Resource fencing & recovery proof
Make every authoritative resource operation carry the placement epoch and durably reject stale writers. Then run the outstanding two-boot lifecycle and two-vessel plus witness partition/failover proof. Grant admission by itself is not the finish line.
JefeRust Phase-2 parity
Port Service, local reconcile, the crash-loop guard, and singleton placement.
Cross-kernel membership interoperability is proven; cross-kernel supervision and failover
are not.
Workload and placement depth
Prove a real workload across vessel loss or panic, plumb exit status so
OnFailure differs from Always, and implement
desired_replicas > 1 with anti-affinity.
Reach, observe, migrate
Add service addressing, a fleet-wide operator view, and only then the checkpoint, connection, and storage contracts needed for live migration. None is present today.
Dual-kernel hot-swap (C++ ↔ Rust)
The originating thesis reached for a subsystem hot-swap angle. Hot-swapping a kernel subsystem (C++ → a Rust equivalent) at runtime is a multi-quarter architecture bet distinct from cell-level live-replaceability. It is open — the sustainability of JefeRust perpetually playing "catch-up" is genuinely questioned, and this is deferred to a dedicated roadmapping session.
This whitepaper is the full thesis and direction. Phase 1 is built on both kernels; C++ has crossed into first-class service supervision and stateless singleton failover; signed placement-authority installation is partial. Everything beyond that boundary is labeled proposed or open above.