Components

Components

Runink Platform Components

This page describes the core building blocks of Runink โ€” from the API server to slices โ€” that make up the distributed data environment. Each component serves a purpose in ensuring secure, auditable, and high-performance pipeline execution.

Components Table

ComponentRoleLocation
API ServerEntry point, AuthN/Z, coordinationControl Plane
Identity ManagerOIDC/JWT validation and RBAC enforcementControl Plane
BarnRaft-backed KV storeControl Plane
SchedulerDAG-aware placement engineControl Plane
Secrets ManagerEncrypted secret storage and deliveryControl Plane
Governance SvcLineage, quality, LLM annotationsControl Plane
Runi AgentWorker orchestrator (cgroup+namespace)Worker Node
Runi SliceExecuted unit of pipeline logicWorker Node
HerdTenant boundary and resource isolationSystem-wide
ContractsData validation and schema enforcementContracts repo
DSL ParserConverts .dsl to Go DAGsBuild pipeline

Runink Services

๐Ÿ“˜ Contract Engine

All data contracts (schemas) are defined in Go structs, with support for:

  • Required/optional fields
  • Type validation and coercion
  • Golden testing and schema diffing
  • Metadata annotations (e.g., PII, lineage tags)

๐Ÿ’ผ Used in: DSL @contract, golden tests, slice validation stages.

โœ๏ธ Feature DSL Parser

Parser and compiler for .dsl files.

  • Converts scenario definitions into Go-based DAGs
  • Enforces step ordering and contract compliance
  • Attaches metadata for scheduling, RBAC, lineage

๐Ÿ”ค Keywords: @step, @contract, @source, @sink, @affinity, @requires.


๐Ÿƒ Runi Agent

Daemon running on each worker node, responsible for execution.

  • Registers with the control plane.
  • Launches slices as Go processes within cgroups and namespaces.
  • Sets up stdio pipes, config injection, and secrets access.
  • Collects logs and exposes Prometheus metrics.

๐Ÿ’ก Design: PID 1 in isolated namespace, manages ephemeral slices securely.


โš™๏ธ Runi Slice

A single unit of work โ€” a pipeline step โ€” running in an isolated environment.

  • Executed via os.Exec as a native Go binary.
  • Enforces herd-defined resource quotas using cgroups.
  • Receives config, secrets, and contracts.
  • Reports lineage to Governance Service.

๐Ÿ“ฆ Properties: Ephemeral, scoped, observable, auditable.


๐Ÿงฑ Barn (Cluster State Store)

A Raft-backed KV store providing durable, consistent cluster state.

  • Stores pipeline definitions, slice metadata, herd configs, secrets, etc.
  • Supports leader election and quorum for all control plane decisions.

๐Ÿ›ก๏ธ Guarantees: High availability, deterministic orchestration, and strong consistency.


๐Ÿงฐ Herd

Logical boundary for multi-tenancy, quotas, and governance.

  • Maps to a namespace (network, user, mount, etc.).
  • RBAC is scoped per herd.
  • Resource quotas applied at the herd level.
  • All metadata, secrets, and lineage are tagged with a herd context.

๐Ÿ” Analogy: Like Kubernetes namespaces but tighter and more secure.


Herd Control Plane Services

๐Ÿ“ก API Server

The entry point for all client interactions (CLI, UI, and service integrations).

  • Exposes REST/gRPC APIs secured via OIDC/JWT.
  • Enforces RBAC and herd scoping.
  • Forwards validated requests to:
    • State store (Barn)
    • Identity Manager
    • Scheduler
    • Secrets Manager
    • Governance Service

๐Ÿ” Security: Applies policies based on identity and herd-level permissions.

๐Ÿง  Identity & RBAC Manager

Responsible for identity resolution and access control.

  • Validates JWT/OIDC tokens.
  • Resolves user roles and herd membership.
  • Provides per-herd scoped RBAC policies.

๐Ÿ“˜ Location: Can run co-located with the API server or standalone.

๐Ÿ“… Slice Scheduler

The component responsible for task placement and orchestration.

  • Reads resource constraints from DSLs (@requires).
  • Evaluates herd quotas, affinities, and node health.
  • Determines optimal slice placement.
  • Writes placements into Barn.

๐Ÿงฎ Logic: Constraint-solving over stateful inputs โ€” affinity, quotas, node availability.

๐Ÿ” Secrets Manager

Handles secure secrets storage and delivery.

  • Stores secrets in encrypted form (AES/GCM).
  • Enforces access via RBAC.
  • Slices receive secrets via Runi Agent during launch.

๐Ÿ—๏ธ Design: Secrets access scoped by herd and role, logged via Raft.

๐Ÿ“Š Data Governance Service

Tracks lineage, metadata, and annotations for all slices.

  • Stores rich metadata per run, stage, and contract hash.
  • Supports querying for audit, compliance, and debugging.
  • Can receive LLM-based annotations.

๐Ÿ”Ž Outputs: Lineage graphs, quality reports, field-level annotations.

๐Ÿ” Observability Stack

Built-in support for:

  • Prometheus: Metrics exposure via /metrics
  • Fluentd or stdout logs: Structured JSON logs captured per slice
  • gRPC metadata reporting: Trace context, tags, and result metadata

๐Ÿงญ Goal: Enable deep pipeline inspection without needing external agents.


๐Ÿ”„ Pipes and Channels

Slices and agents use pipes (via io.Pipe, os.Pipe, net.Pipe) to transmit data and logs.

  • Steps within a slice communicate via in-memory streams.
  • No intermediate buffering โ€” zero-copy, backpressure-safe.
  • Logs are captured via stdout/stderr and piped to the agent.

๐Ÿšฐ Benefits: Stream processing, constant memory, no containers.