Marketplace & workloads

x/resources — Resources

Shared resource-unit and capacity definitions used across the marketplace.

Reference

What it does

The resources module defines the vocabulary of the marketplace: what a unit of CPU, memory, storage, or GPU means, how capacity is expressed, and how resource requirements are compared for matching. Every module that talks about capacity — deployments, orders, bids, usage records — uses these shared definitions.

Centralizing the resource model prevents drift: a bid can be checked against an order, and a usage record against a lease, because all three quantify resources identically.

Why it exists: Marketplaces fail on ambiguity. If tenant and provider disagree on what "one unit of compute" means, matching and settlement both break. A single, consensus-maintained resource model is what makes cross-provider price comparison and automated settlement possible.

State

Primary objects

ConceptDefinition
Resource unitThe canonical quantification of CPU, memory, storage, or accelerator capacity.
CapacityA provider's leasable inventory, expressed in resource units for matching.

Messages

Messages & queries

Message and query surfaces are documented at implementation level in the module docs ↗ and the source ↗. The objects above are the state those messages create and transition.

Connections

Module interactions

Flows

Core flow

  1. Define — Units are defined once. The module fixes what each unit of CPU, memory, storage, or accelerator capacity means.
  2. Express — Capacity and demand use them. Providers express inventory and deployments express requirements in the same shared units.
  3. Match — Orders meet bids. Matching compares specifications written in the shared vocabulary — no translation layer, no ambiguity.
  4. Settle — Usage bills in kind. Consumption is recorded and settled in the units it was leased in, with benchmarks qualifying abstract units by measured performance.

Questions

Asked about x/resources

Why centralize the resource model?

Marketplaces fail on ambiguity: if tenant and provider disagree on what one unit of compute means, matching and settlement both break. A single consensus-maintained model makes cross-provider comparison and automated settlement possible.

What do benchmarks add to units?

They ground abstract units in measured hardware performance — the same unit of compute qualified by what the underlying hardware actually measures.

x/benchmark module

Which modules use these definitions?

Every module that talks about capacity: deployments express requirements in them, orders and bids match on them, and usage records and settlement bill in them.

More questions → FAQ

Related

Related modules