ARCHOS 525 BLUEPRINT · /d/dgm_code-aho-corasick-multi-pattern-matching
Aho-Corasick Multi-Pattern Matching (DLP, WAF & Guardrails)
6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_code-aho-corasick-multi-pattern-matching) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-aho-corasick-multi-pattern-matching)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-aho-corasick-multi-pattern-matching" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Aho-Corasick Multi-Pattern Matching (DLP, WAF & Guardrails) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Text / Packet Stream"]
n1_1[("Compiled Automaton")]
n2a_2["Byte-Stream Scanner"]
n2b_3[("Failure Link Table")]
n3_4["Match Collector"]
downstream_5["Downstream & OTel"]
client_0 -->|"1. Load DFA · DFA"| n1_1
n1_1 -->|"2a. Step state · Scan"| n2a_2
n1_1 -->|"2b. Fail jump · Link"| n2b_3
n2a_2 -->|"3a. Emit hits · Matches"| n3_4
n2b_3 -->|"3b. Merge · RAM"| n3_4
n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5COMPONENT STACK (6)
- Text / Packet StreamSTATELESSPrompt / HTTP / Log Payload
- Compiled AutomatonSTATEFULTrie + failure links + output
- Byte-Stream ScannerSTATELESSSingle pass O zero-backtrack
- Failure Link TableSTATEFULFallback on mismatch without rewind
- Match CollectorSTATELESSEmits all overlapping hits
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- Text / Packet Stream → Compiled Automaton (Load DFA)[DFA]
- Compiled Automaton → Byte-Stream Scanner (Step state)[Scan]
- Compiled Automaton → Failure Link Table (Fail jump)[Link]
- Byte-Stream Scanner → Match Collector (Emit hits)[Matches]
- Failure Link Table → Match Collector (Merge)[RAM]
- Match Collector → Downstream & OTel (Emit /)[OTLP/API]