(8) ACLs#1565
Draft
daniel-noland wants to merge 1 commit into
Draft
Conversation
Introduces two new crates, scoped narrowly to "1Hz ACL updates" so we can develop and experiment with the cascade and update logic without the 6-10k-line LSM avalanche described in the rfc-lsm branch. `dataplane-cascade`: head + frozen[] + tail with multi-writer head absorption via the `Upsert` trait (commutative+associative folding). Slot-published `Cascade` with `rotate` (freeze head, install new) and `compact` (fuse frozen into tail via `MergeInto`). `Snapshot` walks head -> frozen[] -> tail and stops at the first definitive answer. `Generation` newtype is in place; `lookup_at` / `compact_through` exist but aren't load-bearing yet at 1Hz update rate. `DrainEvent` / `subscribe` are behind a feature flag, off by default. `dataplane-acl`: software ACL classifier wrapping the cascade. `AclHead` is a `Mutex<BTreeMap<Priority, AclRule>>`; `AclFrozen` is a priority-sorted Vec; `AclTail` is structurally identical (room to swap a richer representation later). Compaction merges sealed layers into the tail with priority dedup. Deferred for follow-up PRs (already worked out on rfc-lsm but not shipping yet): mat facade crate, mat-runtime (PolicyGenAllocator, ManagedCascade), mat-state-sync (PeerDedup), pressure regimes / try_reset, FlowOrigin / HasOrigin, conntrack-shape cascade. See `.scratch/lsm.md` and `.scratch/mat-pipeline-rfc/0001-mat-pipeline.md` for the broader design this is a thin slice of. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Introduces two new crates, scoped narrowly to "1Hz ACL updates" so we can develop and experiment with the cascade and update logic without the 6-10k-line LSM avalanche described in the rfc-lsm branch.
dataplane-cascade: head + frozen[] + tail with multi-writer head absorption via theUpserttrait (commutative+associative folding). Slot-publishedCascadewithrotate(freeze head, install new) andcompact(fuse frozen into tail viaMergeInto).Snapshotwalks head -> frozen[] -> tail and stops at the first definitive answer.Generationnewtype is in place;lookup_at/compact_throughexist but aren't load-bearing yet at 1Hz update rate.DrainEvent/subscribeare behind a feature flag, off by default.dataplane-acl: software ACL classifier wrapping the cascade.AclHeadis aMutex<BTreeMap<Priority, AclRule>>;AclFrozenis a priority-sorted Vec;AclTailis structurally identical (room to swap a richer representation later). Compaction merges sealed layers into the tail with priority dedup.Deferred for follow-up PRs (already worked out on rfc-lsm but not shipping yet): mat facade crate, mat-runtime (PolicyGenAllocator, ManagedCascade), mat-state-sync (PeerDedup), pressure regimes / try_reset, FlowOrigin / HasOrigin, conntrack-shape cascade.
See
.scratch/lsm.mdand.scratch/mat-pipeline-rfc/0001-mat-pipeline.mdfor the broader design this is a thin slice of.