Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Overview

vm-iucv is a lightweight actor framework inspired by IBM’s VM/CMS inter-machine communication facilities. Each actor is a machine — an isolated unit with its own message handler — coordinated by a Supervisor that manages lifecycle, messaging, and IUCV paths.

Architecture

┌──────────────────────────────────────────┐
│                Supervisor                │
│                                          │
│  ┌─────────┐  ┌─────────┐  ┌─────────┐   │
│  │ ALICE   │  │ BOB     │  │ CHARLIE │   │
│  │ handler │  │ handler │  │ handler │   │
│  └────┬────┘  └────┬────┘  └────┬────┘   │
│       │            │            │        │
│  ┌────┴────────────┴────────────┴────┐   │
│  │         Router (SMSG)             │   │
│  └───────────────────────────────────┘   │
│  ┌───────────────────────────────────┐   │
│  │     Path Command Loop (IUCV)      │   │
│  └───────────────────────────────────┘   │
└──────────────────────────────────────────┘

VM/CMS Analogy

VM/CMS Conceptvm-iucv Equivalent
Virtual machineMachineId + MachineHandler
CP (Control Program)Supervisor
IPL (boot)supervisor.ipl()
LOGOFFsupervisor.logoff()
CP SMSGsupervisor.smsg() / ctx.try_send_smsg()
IUCV CONNECTsupervisor.connect()
IUCV SEVERsupervisor.sever() / ctx.sever_path()
IUCV SENDctx.iucv_send()
IUCV RECEIVEon_iucv_data() callback

Key Design Principles

Fire-and-forget messaging. SMSG delivery is best-effort, matching the real CP SMSG semantics. If a target machine’s channel is full, the message is silently dropped.

Synchronous handlers. All MachineHandler callbacks run synchronously on the machine’s Tokio task. This keeps the programming model simple — handlers never need to be async. Use ctx.try_send_smsg() or ctx.iucv_send() to communicate without blocking.

Path-based connections. IUCV paths provide a bidirectional data channel between two machines, with explicit connect/accept/sever lifecycle. Paths carry binary data (IucvBuffer) rather than text.

Crate Features

FeatureDescription
test-utilEnables CollectorHandler / CollectorHandle for testing
examplesPulls in tokio runtime features needed for examples