Expand description
Services, actions and streams (blueprint §9.4).
All three ride ordinary edges plus metadata correlation — no separate RPC subsystem: services (
request_id), actions (goal_id/goal_statusFSM: Accepted→Executing→{Succeeded, Aborted, Canceled}), streams (session_id/segment_id/seq/fin/flush).
That sentence is the whole design. There is no service socket, no action
server, no stream channel — there are edges, and there is
astrs_wire::Metadata. What this module adds is the bookkeeping that
makes the three patterns correct rather than merely expressible:
| Pattern | What is easy to get wrong | What this module does |
|---|---|---|
service | Answering with the wrong (or no) request_id | ServiceRequest carries the id; the response helper copies it |
action | An illegal FSM transition, or a status after a terminal one | GoalTracker refuses both |
stream | Gaps, reordering, a segment that never ends | StreamAssembler detects all three |
§Eviction immunity comes for free
A message carrying request_id, goal_id or goal_status is
eviction-immune in every input queue (§11.2), because
astrs_wire::Metadata::is_correlated says so and
crate::events::QueuedEvent forwards that to the scheduler. So a service
response cannot be the message a full queue drops — which is the one drop
that would wedge a client forever.
Re-exports§
pub use action::ActionOutcome;pub use action::GoalId;pub use action::GoalTracker;pub use service::RequestId;pub use service::ServiceRequest;pub use service::ServiceResponse;pub use stream::ChunkRef;pub use stream::StreamAssembler;pub use stream::StreamSegment;pub use stream::StreamWriter;
Modules§
- action
- Long-running goals with a status FSM (blueprint §9.4,
goal_id/goal_status). - service
- Request/response over ordinary edges (blueprint §9.4,
request_id). - stream
- Chunked transfers over ordinary edges (blueprint §9.4,
session_id/segment_id/seq/fin/flush).
Functions§
- fresh_
id - A fresh, unique correlation id.