feat(core): add direct JSON byte paths for remote access#203
Merged
Conversation
lxsaah
approved these changes
Jul 23, 2026
lxsaah
left a comment
Contributor
There was a problem hiding this comment.
Lgtm! Non-blocking follow-up: converting the shared drain_values to try_recv_json_bytes would give record.drain the direct path via RawValue (already used by the envelope) and drop the re-serialization in record.get’s ring fallback as well. We should think of a follow-up issue here! Thanks!!
lxsaah
added a commit
that referenced
this pull request
Jul 24, 2026
Reconcile main's direct-JSON-byte remote path (#192/#203) with design-048's SubUpdate.skipped loss-signal design: - Subscribe path keeps design-048's SubUpdate/skipped contract (the merged Session::subscribe trait yields BoxStream<SubUpdate>); stream.rs stays on the (Value, u64) design. - dispatch.rs combines both: SubUpdate subscribe + wildcard fan-in + WI1 hello() version gate, plus main's DispatchReply / record.get fast path. Restored the futures_util::StreamExt import main had dropped. - aimdb-bench/Cargo.toml unions both bench sets (fanout_encode + remote_json); remote_json.rs updated for Outbound::Event's new `topic` field. main's direct-JSON-bytes optimization in the live subscribe path is superseded here and left as the documented follow-up (design 048, "removing the intermediate serde_json::Value"). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Description
Adds a compatibility-preserving direct JSON byte path to AimDB's type-erased remote-access stack.
RemoteSerialize,JsonCodec<T>,JsonRecordAccessandJsonBufferReader.serde_json::Valuefallbacks.serde_json::to_vecandserde_json::from_slice.serde_json::Value.record.setand write wrapper handling on the existing tree path. Inbound wire handling does not use hand-written JSON offset extraction.criterionbenchmark coverage.Performance
The focused benchmarks measure the in-memory typed-record-to-AimX-envelope boundary. They do not include connector queues, scheduler wakeups, syscalls or physical wire time.
Validation
make checkcargo test -p aimdb-benchcargo bench -p aimdb-bench --bench b0_alloc_remote_jsoncargo bench -p aimdb-bench --bench b1_b2_remote_jsonThe full repository gate covers formatting, linting, host tests, valid feature combinations,
no_std+ alloc, Cortex-M, WASM, dependency policy, README drift, codegen drift and production simulation checks.Related Issue
Checklist
make check).