Skip to content

Remote plugins: compose Dim parts as leafs across machines #1288

Open
2 of 10 issues completed
Open

Description

@eric8810

Context

Dim should be composable across machines: a Session or branch instance lives in one kernel, while the parts that do work and the resources they need can run elsewhere. This parent tracks the implementation. The analysis is in docs/design/research/remote-plugins.md.

It serves:

  • remote execution;
  • remote file read and write;
  • central session state (tracked separately; see Non-goals).

Model

  • Instance: a Session or branch, owned by exactly one kernel. Instances do not federate.
  • Leaf: a session far end that does not resolve names. The host resolves the inject keys and lends them. Node/Python parts already run this way; this work makes the leaf remote and adds a Rust leaf host.
  • Resource leaf: a leaf that owns local resources (exec, fs, OCR, MCP) and provides data services. It can be mounted from the resource machine.
  • Data face: every public service is id + operations + events. internal is an explicit exception with a reason. A service host code looks up by type (branch.service::<T>(), Key<T>) is a consumer too; a part that provides a Rust-only service is not leaf-ready. A part is leaf-able only if its injects are dispatched, it uses only dispatched methods, and it captures no non-service Rust state.

The principles (planes, seams, one owner, data faces, instance non-federation) are in the research document's "remote composition model" section.

Scope

  1. Link and leaf runtime: WebSocket transport, connection rows, leaf session, remote Node/Python runtimes.
  2. Rust leaf host for existing Rust plugins.
  3. Service shape policy (data by default, internal explicit) and the first data faces.
  4. Resource leaf contract: external mount, identity, lifecycle.
  5. execHost and fsHost data services, and the consumers that use them.
  6. An ADR recording the composition rules.

Non-goals

  • Instance federation (an instance from one kernel with parts from another).
  • Automatic takeover or multiple writers per Session; one Session has one owner.
  • Remote Session/branch parts from a peer kernel.
  • File bytes in the database.
  • PostgreSQL backend: #1298.

Sub-issues

Order: #1290 first; #1294 and #1293 after it; #1296 after #1293; #1295 and #1297 after #1296. #1289, #1300, #1292 and #1291 can proceed in parallel.

References

Sub-issues

Sub-issues

2 of 10 Issues completed
Loading 10 sub-issues

Metadata

Metadata

Assignees

Labels

P2coredesignroadmap

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions