docs(roadmap): RFC 013 (typed addressable mailboxes) up-next
- add RFC 013 as the up-next item, sequenced before send_after - mark process groups shipped (RFC 012, b78311b..56f2fc5) - note send_after now depends on 013 for Dest; cross-link clustering name-addressing
This commit is contained in:
+28
-3
@@ -50,7 +50,30 @@ Consequences:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Up next — Process groups: the primitive pubsub & channels should have sat on
|
## Up next — RFC 013: typed addressable mailboxes (send to pid / name)
|
||||||
|
|
||||||
|
Design agreed; full spec persisted in SMARM (`rfc_013-typed-addressable-mailboxes.md`)
|
||||||
|
and at `/root/`. The unblocker several later items quietly assume: today a `Pid`
|
||||||
|
isn't messageable, so `whereis → Pid` is near-useless and there is no send-to-pid/
|
||||||
|
name primitive. RFC 013 reworks `registry.rs` from a name↔pid *bimap* into a
|
||||||
|
name→**live mailbox** directory off the cold leaf, with two typed addressing modes
|
||||||
|
— `Pid<A>` (direct, identity-bound) and `Name<M>` (durable, re-resolving,
|
||||||
|
location-transparent). Compile-time typing is preserved via phantom tokens over
|
||||||
|
*contained* `Box<dyn Any>` erasure; the global-enum alternative was rejected
|
||||||
|
because it breaks library-extensibility (users outside the crate define actors).
|
||||||
|
Sequenced **before `send_after`** (whose `Dest` becomes a `Pid<A>` / `Name<M>`
|
||||||
|
resolved on fire), is the foundation for clustering's "addressed by name not pid"
|
||||||
|
migratable gen_servers, and makes the registry observer-ready for introspection
|
||||||
|
(entry carries pid + `&'static str` msg-type). Note this extends — does not retire
|
||||||
|
— the standing "select exists; a unified per-process mailbox still does not"
|
||||||
|
invariant: 013 adds addressable *delivery*, not a unified inbox; multi-port stays
|
||||||
|
`select` composition over several named channels.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Process groups — the primitive pubsub & channels should have sat on ✅ SHIPPED (RFC 012)
|
||||||
|
*(`src/pg.rs`, four commits `b78311b`→`56f2fc5`; see HANDOFF + git history. Context retained below.)*
|
||||||
|
|
||||||
Context: urus is a webserver written on top of smarm to provide a testing target.
|
Context: urus is a webserver written on top of smarm to provide a testing target.
|
||||||
A named pid→multiset map with monitor-backed removal: `registry.rs` generalised
|
A named pid→multiset map with monitor-backed removal: `registry.rs` generalised
|
||||||
from name↔pid *bimap* to name→*multiset*, the death hook reused verbatim. Local
|
from name↔pid *bimap* to name→*multiset*, the death hook reused verbatim. Local
|
||||||
@@ -76,7 +99,9 @@ and then an RFC before it can be scheduled.
|
|||||||
#### send_after / cancel_timer
|
#### send_after / cancel_timer
|
||||||
Message-delivery timer on the existing min-heap (`timer.rs`): deliver a value to a
|
Message-delivery timer on the existing min-heap (`timer.rs`): deliver a value to a
|
||||||
channel at a deadline, cancellable. Unlocks the gen_server idioms with no clean
|
channel at a deadline, cancellable. Unlocks the gen_server idioms with no clean
|
||||||
expression today — heartbeat, debounce, retry backoff, session expiry. Small;
|
expression today — heartbeat, debounce, retry backoff, session expiry. Small.
|
||||||
|
**Depends on RFC 013** (sequenced ahead of it): `Dest` resolves to a `Pid<A>` /
|
||||||
|
`Name<M>` *on fire*, not a bespoke channel/closure — see 013's send_after note.
|
||||||
|
|
||||||
#### Introspection — process_info / get_state / tree dump
|
#### Introspection — process_info / get_state / tree dump
|
||||||
`trace.rs` is the seed. What an actor is parked on, queue depth, stack size; a
|
`trace.rs` is the seed. What an actor is parked on, queue depth, stack size; a
|
||||||
@@ -148,7 +173,7 @@ RFCs, not one. Spine settled in discussion; decisions still open:
|
|||||||
- **Migratable gen_servers** as a sub-layer: only behaviours migrate (a raw actor's
|
- **Migratable gen_servers** as a sub-layer: only behaviours migrate (a raw actor's
|
||||||
stack is opaque; a gen_server *between callbacks* is just its `State`), gated by
|
stack is opaque; a gen_server *between callbacks* is just its `State`), gated by
|
||||||
`Serialize` bounds + an `on_arrive` reacquire hook, addressed by name not pid. The
|
`Serialize` bounds + an `on_arrive` reacquire hook, addressed by name not pid. The
|
||||||
BEAM can't do this — leaning on the behaviour layer is what buys it. Requires `State` to be serializable, so should probaby spec a `trait MigratableGenServer: GenServer where Self::State: Migratable` , or something to that extent, so we can lean on the type system to make sure we don't accidentally make state that cannot be serialised.
|
BEAM can't do this — leaning on the behaviour layer is what buys it. Requires `State` to be serializable, so should probaby spec a `trait MigratableGenServer: GenServer where Self::State: Migratable` , or something to that extent, so we can lean on the type system to make sure we don't accidentally make state that cannot be serialised. (The "addressed by name not pid" half is RFC 013's `Name<M>` durable address — its local form is the foundation this remote layer extends.)
|
||||||
- **CRDT presence** is the high-value, genuinely-hard layer above distributed pg,
|
- **CRDT presence** is the high-value, genuinely-hard layer above distributed pg,
|
||||||
kept *out* of the pg primitive (the pg2 strong-consistency lesson). Furthest out. Can maybe defer to rust ecosystem
|
kept *out* of the pg primitive (the pg2 strong-consistency lesson). Furthest out. Can maybe defer to rust ecosystem
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user