Skip to content

docs(design): revise 054 against the tree after 055 - #270

Merged
lxsaah merged 1 commit into
mainfrom
docs/054-revise-after-055
Oct 1, 2026
Merged

lxsaah merged 1 commit into
mainfrom
docs/054-revise-after-055

Conversation

@lxsaah

@lxsaah lxsaah commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Description

Revises design 054 (zero-allocation connector boundary). The doc was written before 055 landed, and a few of its claims about the MQTT connector didn't match the code. This PR changes only the doc, no code.

Rebased on 055

  • InboundDispatch::new now takes a &'static dyn TopicGrammar and returns DbResult, matching AimDb::inbound_router. subscriptions() replaces resource_ids().
  • The four 055 bench rows (inbound_route_pattern, _keyed_known, _keyed_new) are added to the baseline and target tables. G1 now says "steady state" and excludes the first sighting of a key.

MQTT connector: corrected against the code

  • Inbound copies the topic on both backends: embedded topic_name.to_string(), native publish.topic.clone(). The native clone could simply be a move and is called out as a standalone fix.
  • The embedded outbound path allocates a Vec<u8> per packet in session_loop::encode for the Channel<Vec<u8>, 4> write queue. The byte ring in §4.6 didn't remove that, so "allocation-free MQTT path" was false. The embedded design now encodes PUBLISH packets straight into a write ring that replaces the channel.
  • Native outbound lists two options: ReusableBoxFuture (the default, keeps backpressure) or try_publish (errors reported immediately, no readiness signal).

RoutePublisher semantics

  • Adds poll_flush, a flush on shutdown, and explicit error attribution for asynchronous hand-over (an error surfaces one message late).
  • The pump loop now waits for poll_ready before receiving, the usual Sink order.

Other

  • Drops the async recv/recv_into instead of promising an adapter. The only implementors are in this repo.
  • G3: CI only builds b0_alloc_connector today and never runs it. A CI job that runs it is added in migration step 1.
  • Notes that the embedded EventChannel stops absorbing bursts once ingest calls dispatch directly.
  • Adds Zenoh (053) to the migration plan, a new alternative (a heapless action channel), and new open questions (reserved ring space for control packets, packet-id reservation).

Related Issue

Checklist

  • I have read the CONTRIBUTING.md document.
  • My code follows the project's coding standards. (docs only)
  • I have added tests to cover my changes. (n/a, docs only)
  • All new and existing tests passed (make check). (not run; no code changes)
  • I have updated the documentation accordingly.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RADQu7JwhKvSpicW4qzFz8


Generated by Claude Code

- Rebase the inbound entry point on 055's router: InboundDispatch::new
  takes the grammar and returns DbResult; subscriptions() replaces
  resource_ids(); add the 055 bench rows to the baseline and targets.
- Correct the MQTT connector-side copy count (topic copies inbound on
  both backends) and record the embedded per-packet encode Vec; the
  embedded outbound design now encodes straight into the write ring.
- Specify RoutePublisher flush, shutdown and error attribution; call
  poll_ready before receiving (Sink order).
- Drop the async recv/recv_into instead of promising an adapter.
- Native outbound: ReusableBoxFuture vs try_publish, with the default.
- G3: the bench is only built in CI today; add the job in step 1.
- Note the embedded EventChannel burst-slack behaviour change, Zenoh
  (053), and new open questions (control-packet space, packet ids).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RADQu7JwhKvSpicW4qzFz8
@lxsaah
lxsaah merged commit a67593e into main Oct 1, 2026
7 checks passed
@lxsaah
lxsaah deleted the docs/054-revise-after-055 branch October 1, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants