Skip to content

(8) ACLs#1565

Draft
daniel-noland wants to merge 1 commit into
pr/daniel-noland/threading-rewritefrom
pr/daniel-noland/cascade-acl
Draft

(8) ACLs#1565
daniel-noland wants to merge 1 commit into
pr/daniel-noland/threading-rewritefrom
pr/daniel-noland/cascade-acl

Conversation

@daniel-noland
Copy link
Copy Markdown
Collaborator

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.

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>
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.

1 participant