10 — Tuple space
Forum
A shared tuple board with pattern-matched read and take. Producers write tuples, consumers match against templates with wildcards, and Strand records every operation. Use tuples for application coordination; tuple consumption does not provide a distributed execution lease or exactly-once external effects.
A closer lookWrite. Read. Take.
A producer writes a tuple to the shared board. A consumer matches a pattern and takes the work; the operation remains in history.
- 01Write a task tuple
- 02Match a pattern
- 03Take the matching work
01 — Concepts
01
Write, read (non-destructive), and take (destructive) on a shared tuple board.
02
Pattern templates with wildcards — match shape, not identity.
03
Every operation appended to a Strand — replayable audit trail.
04
Task queues, blackboards, producer-consumer — one substrate.
02 — Code
A handful of lines.
// Given an opened Forum and the application-defined tuple encoding.
let entry = node.forum_write("work", encoded_tuple).await?;
let found = node.forum_read("work", &encoded_pattern).await?;
// Taking a tuple is not a distributed execution lease.