nustack

Fabric

A Fabric is an addressable space where Refs live. It owns a slice of the world and knows how to resolve addresses inside that slice.

What a Fabric provides

  • an address space - what its Refs can name;
  • a resolution capability - how to turn a Ref into a read, write, or Action against the underlying resource.

The minimal surface a Fabric answers:

  • read - value at an address;
  • write - place a value at an address;
  • list - enumerate addresses under a subpath (where applicable);
  • delete - remove an address (where applicable).

Not every Fabric offers every capability. A read-only http Fabric has no write; an append-only log Fabric has no delete. The Fabric declares what it supports; Refs into it inherit those limits.

Examples

FabricAddress spaceReadsWrites
in-memory dictkeysdict lookupdict assignment
filesystempathsfile readfile write
http apiURLsGETPOST / PUT / DELETE
sql databasetable + row + columnSELECTINSERT / UPDATE / DELETE
kv storekeysGETPUT / DEL
message queuequeue namereceivesend

Each of these is a Fabric. The Ref carries the address; the Fabric carries out the resolution.

Not a citizen of the model

A Fabric is not a Nu atom. It lives one layer below - Refs and Interactions are the model's citizens, Fabrics are the machinery underneath that makes them do anything.

On this page