RTT-aware mux - #5405
Draft
crocodile-dentist wants to merge 17 commits into
Draft
Conversation
These modules provide a fingertree-backed sliding window with fixed element count. The fingertree backend caches a user-supplied monoidal measure `v` which updates incrementally as elements are added and evicted, which allows for constant time lookup of its value regardless of window size. The Window.Count module exposes a public API, and the private internal implementation is exposed by the Internal.Count module without any guarantees that it stays compatible between any releases. The Measures module exposes some common and practical prebuilt measures.
These modules keep samples within a configured duration of the newest sample's timestamp. These variants abstract over the timestamp type via the 'TimeLike' class, which have two implementations defined: - `UTCTime` / `NominalDiffTime` (wall-clock, from `time`) - `Time` / `DiffTime` (monotonic, from `io-classes:si-timers`) Monotonic is preferred when sliding-window correctness must not be perturbed by NTP corrections or wall-clock jumps; wall-clock fits data that already carries `UTCTime` timestamps.
These modules expose sliding windows backed by an approximate t-digest measure, which permit efficient computations of quantiles in bounded memory.
These expose some combinators which allow for summarising rolling statistics across a long stream in constant memory.
Introduces new wire format in the Mux codec and some surface types. Replace the single Word32 mhTimestamp with two Word16-sized fields mhSendCookie and mhEchoCookie. New `PeerRTT` type, threaded into `ExpandedInitiatorContext` and `ResponderContext` to expose eventually at application level. todo: tracing, deltaq, integration, tests/benchmarks rtt
- muxer and demuxer accept RTTState - the muxer mints a new cookie (or re-uses one) per the policy, and processSingleWanton echoes the last send cookie we received from our peer (provided by the demuxer). - the demuxer in addition to the previous activity also prunes our cookie jar so it stays within bounded space.
To generate our cookies and prevent forgery attacks, we thread a PRNG from the top level, through connection handler, and into our mux.
Adds MiniProtocolNum field so downstream trace consumers can bucket or filter per mini-protocol. This is the prerequisite for either for filtering out some protocols contributions, or bucketing them and pooling the aggregate. Add TraceRecvBurstSDU MiniProtocolNum Word16 DiffTime which allows us to recover burst-SDU per-byte cost via a separate through-origin estimator.
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
This patch introduces echo-cookie rtt sampling mechanism into the Mux.
Checklist
Quality
Maintenance
ouroboros-networkproject.