Varlink IPC Specifications
syntropd relies exclusively on native Varlink IPC over Unix domain sockets. Messages consist of null-terminated UTF-8 JSON payloads with native support for type checking, error declarations, and streaming replies.
io.syntrop.Inference1
/run/syntrop/io.syntrop.Inference1
Hardware compute discovery, multi-accelerator lease arbitration, PSI telemetry, and streaming model inference.
interface io.syntrop.Inference1
type ComputePlane (
id: string,
name: string,
kind: string,
total_memory: int,
available_memory: int,
is_triage_reserved: bool
)
type LeaseInfo (
id: string,
plane_id: string,
allocated_memory: int,
priority: string,
state: string,
client_unit: ?string,
client_pid: ?int
)
type PlaneSlice (
plane_id: string,
role: string,
stage_index: ?int,
memory_bytes: int
)
type CompositeLease (
lease_id: string,
gang_id: string,
gang_policy: string,
slices: []PlaneSlice
)
type ModelInfo (
id: string,
format: string,
path: string,
estimated_memory: int,
placement: string
)
method GetTopology() -> (
planes: []ComputePlane,
total_ram: int,
available_ram: int,
cpu_cores: int
)
method GetPressure() -> (
level: string,
cpu_some: float,
memory_some: float,
io_some: float
)
method AcquireLease(
priority: string,
memory_bytes: int,
plane: ?string,
unit: ?string,
pid: ?int
) -> (
lease_id: string,
plane_id: string,
allocated_memory: int
)
method AcquireCompositeLease(
gang_id: string,
slices: []PlaneSlice,
gang_policy: string,
priority: string,
client_unit: ?string
) -> (
lease_id: string,
allocated_slices: []PlaneSlice
)
method ReleaseLease(lease_id: string) -> ()
method Yield(lease_id: string) -> ()
method Freeze(lease_id: string) -> ()
method Thaw(lease_id: string) -> ()
method ListLeases() -> (leases: []LeaseInfo)
method ListCompositeLeases() -> (leases: []CompositeLease)
method ListModels() -> (models: []ModelInfo)
method RegisterModel(
id: string,
format: string,
path: string,
estimated_bytes: int
) -> ()
method StreamInference(
model: string,
prompt: string
) -> (
chunk: string
)
error MethodNotFound (method: string)
error InvalidParameter (parameter: string)
error ResourceExhaustion (plane: string, requested: int, available: int)
error PlaneNotFound (plane: string)
error LeaseNotFound (lease_id: string)
error ModelNotFound (model: string)
Command-Line Invocation
varlinkctl call unix:/run/syntrop/io.syntrop.Inference1 io.syntrop.Inference1.GetTopology '{}'
Sample Reply Payload
{
"planes": [
{"available_memory": 15998242816, "id": "drm-renderD128", "is_triage_reserved": false, "kind": "drm_gpu", "name": "NVIDIA GeForce RTX 4090", "total_memory": 25769803776}
],
"cpu_cores": 32,
"total_ram": 67108864000,
"available_ram": 48210948000
}
Why Varlink over D-Bus or gRPC?
Selecting an IPC mechanism for native operating system services demands strict guarantees: zero daemon runtime overhead, native file-descriptor passing, and human-readable tooling.
| Evaluation Vector | Varlink (syntropd choice) | D-Bus (sd-bus) | gRPC / HTTP2 |
|---|---|---|---|
| Idle Footprint | 0 MB (Kernel AF_UNIX socket buffer) | Requires system bus daemon (`dbus-daemon` / `dbus-broker`) | High (HTTP/2 framing, TLS, connection pools) |
| Framing Protocol | Null-terminated UTF-8 JSON | Binary GVariant/D-Bus wire format | Binary Protocol Buffers |
| Tooling & Debugging | Standard varlinkctl or socat |
busctl or heavy desktop tools |
grpcurl or complex client stubs |
| FD Passing (SCM_RIGHTS) | Native (Direct Unix socket ancillary data) | Supported via Unix FDs | Not natively supported over HTTP/2 |
| Peer Authentication | Native SO_PEERCRED (PID, UID, GID) |
Bus authorization cookies & Polkit | mTLS or Bearer Tokens |
| Introspection Standard | Built-in org.varlink.service |
XML-based org.freedesktop.DBus.Introspectable |
gRPC Server Reflection Protocol |
For neural tensor sharing between inferenced and runtimed, syntropd creates an anonymous in-memory file via memfd_create(2), seals the file against mutation via fcntl(F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE), and transfers ownership across the Varlink socket using sendmsg(2) with SCM_RIGHTS. Both processes map the tensor read-only with zero userspace memory copies.