Skip to content

Determined backend port vocabulary

State: open/building · Kind: module · Audience: system

  • The shared contract every determined Rust backend crate depends on: the capability roster, the per-capability port traits, the call context and the error type.
  • It holds the shared contract plus small shared clients (Ollama, model cache).

Determined’s Rust backends each serve one experience (OCR, notes, photos, backup, sync and so on). This crate defines what they share. It names each switchable backend as a Capability, gives each one an async port trait, and hands every port method one Ctx. Domain crates and the platform crate both depend on it, and it depends on neither. A port can therefore be built and tested without a Tauri or Axum host. It also carries the pieces every backend needs: one CoreError that absorbs the errors of the tier-1 crates, the NDJSON job protocol types, the wire types the endpoints speak, vault and workspace path resolution, and the Ollama and model-cache clients.

  • Capability enum: the roster of switchable experience backends
  • Async port traits, one per capability (ocr, notekit, vault notes, photos, backup, sync, polish, search and others)
  • Ctx: the bundle every port method receives
  • CoreError with From conversions for the atomic-write, fleet, vault-fs and vault-transform errors
  • Job protocol types and the shared wire types for SSE and endpoints
  • Vault, workspace and model-cache directory resolution, and the Ollama client
  • solutions/determined/crates/determined-core/ is a Rust library crate
  • src/capability.rs, src/ctx.rs and src/error.rs define the three core types
  • src/ports/ holds the per-capability traits; src/wire/ holds the wire types
  • src/jobs.rs, src/models.rs and src/ollama.rs hold the job protocol, model cache and Ollama client
  • solutions/determined/crates/determined-core/
  • solutions/determined/crates/determined-core/src/capability.rs#Capability
  • solutions/determined/crates/determined-core/src/ctx.rs#Ctx
  • solutions/determined/crates/determined-core/src/error.rs#CoreError
  • solutions/determined/crates/determined-core/src/ports/mod.rs

← Back to Capabilities