Infrastructure · Data Structures
Stream
Continuous data flow
Definition
Mechanism
An ordered, potentially unbounded sequence of Messages. Represents real-time data pipes, log feeds, or conversational histories. Streams support operations like mapping, filtering, and backpressure. Utilizes Message.
Preconditions
- A Source emitting Messages
Invariants
- Ordering: Messages M_n and M_n+1 maintain relative sequence.
- Causality: Effects cannot precede causes in the stream.
Risks
Failure modes
None stated.
Relationships
Builds on
References
Structured signal container
Used by
References
Discrete temporal occurrence
Real-time readable intent broadcasting
Society
Rule-based message filtering
Ordered container with FIFO/LIFO/priority discipline and explicit dequeue semantics
Reference
Data schema
{
"type": "object",
"required": [
"stream_id"
],
"properties": {
"stream_id": {
"type": "string",
"description": "Unique stream identifier"
},
"messages": {
"type": "array",
"description": "Ordered sequence of messages"
},
"cursor": {
"type": "integer",
"description": "Current read position in the stream"
},
"bounded": {
"type": "boolean",
"description": "Whether the stream has a known end"
}
}
}