Repository navigation
docs(054): drop backward compatibility, two-ring embedded MQTT outbound - #271
Merged
Merged
Conversation
- One mechanism per direction: InboundDispatch inbound, RoutePublisher outbound. Remove Source, pump_source, public inbound_router, Connector::publish, TopicProvider and the compatibility adapters; with_topic_provider becomes with_topic_writer. - Embedded MQTT outbound: route publishers copy raw records into a record ring; the session loop stays the only encoder and writes into a per-connection bip-buffer write ring with a control-packet reserve. - Pump never ends a route on a publish error; document QoS 1 ack-then-drop and ingest latency on both MQTT backends. - Single-branch migration with per-crate table; CI gate lands first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EyVFXVWAec2aouRceoGdpE
- RoutePublisher becomes poll_ready / buffers / commit / poll_flush: the reader serializes topic and payload straight into storage the publisher reserved, removing the scratch-to-publisher copy. route_publisher takes a RouteSpec and returns a Result. - Embedded MQTT: one single-producer, single-consumer record ring per route, so no lock; the session loop encodes round-robin into the write ring, leaving one AimDB copy per message. - Native MQTT moves owned serializer payloads into rumqttc without copying. - Alternatives: hand-encoded zero-copy frames (8) and borrowed-bytes start_send with a shared ring (9) rejected; ring sizing and bbqueue fit added to open questions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EyVFXVWAec2aouRceoGdpE
- Record rings use bbqueue's framed grants (grant, commit with unused tail returned, keep/release on read); the write ring uses stream grants with grant_exact(frame + reserve) to keep a control-packet reserve. - BoxedSlice storage sized per route at build, ArcBBQueue halves, AtomicCoord; a custom Notifier with atomic waker slots fits poll_ready instead of the maitake-sync async notifier. - Spell out the synchronisation: no lock in the per-message path, only waker slots; RMW atomics needed, portable-atomic fallback on thumbv6m. - Open questions: bbqueue pre-1.0 churn, write ring draining on reconnect, inbound chunk channel as a follow-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EyVFXVWAec2aouRceoGdpE
… two steps - Core ScratchPublisher + SendBytes: native MQTT, KNX, WebSocket and the AimX session implement send/send_owned; only embedded MQTT lends buffers. - Embedded MQTT migrates in two steps (write ring, then record rings), with step 1 as a fallback stopping point. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EyVFXVWAec2aouRceoGdpE
Each connector's transport task drives both directions: it pushes received messages into InboundDispatch and pulls serialized messages from OutboundRoutes when its transport can send. Core runs no per-route pumps; the record buffers are the outbound queue. - Removes RoutePublisher, SendBytes, ScratchPublisher, the per-route record rings and the custom notifier from the design. - Embedded MQTT: the action arm pulls from OutboundRoutes under today's gate; a bbqueue write ring replaces the per-packet Vec. One copy, zero allocations, no lock. - Native MQTT: a plain publish loop awaiting AsyncClient; errors are attributed to the message that caused them. - Behaviour changes documented: outbound queueing moves into record buffers, one send at a time per connector, round-robin fairness. - The push design is kept as rejected alternative 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EyVFXVWAec2aouRceoGdpE
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
outbound. Remove Source, pump_source, public inbound_router,
Connector::publish, TopicProvider and the compatibility adapters;
with_topic_provider becomes with_topic_writer.
ring; the session loop stays the only encoder and writes into a
per-connection bip-buffer write ring with a control-packet reserve.
ack-then-drop and ingest latency on both MQTT backends.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01EyVFXVWAec2aouRceoGdpE