mdproctor opened a new issue, #6698:
URL: https://github.com/apache/incubator-kie-drools/issues/6698

   ## Summary
   
   Establish a clean seam between the frozen `*Node` network and pluggable 
evaluation engines.
   
   **Current problem:** `UnitInstance` is doing two jobs — state container 
(Router, Agenda, NodeMemories) and evaluation engine (`wireHead()`, 
`findJoinNode()`, all join/scope/filter wiring logic). The wiring logic is 
explicitly brute-force and temporary; it was written to get tests passing, not 
as the real Rete engine.
   
   ## Changes
   
   - `EvaluationEngine<CTX>` interface: `compile(UnitDescriptor<CTX>, 
EntryPointNode) → CompiledEngine<CTX>`
   - `CompiledEngine<CTX>` interface: `createUnit(CTX ctx) → UnitInstance<CTX>` 
+ `disposeUnit(UnitInstance<CTX>)`
   - `BruteForceCompiledEngine` — holds all current `wireHead()` logic; 
explicitly temporary
   - `UnitInstance` — stripped to pure state bag: `NodeMemories`, `Agenda`, 
`ContextPojoDS`; no wiring logic
   - `UnitDescriptor` — add `EvaluationEngine` field; delegate 
`createInstance()` to it
   
   ## Design constraints
   
   - Unit instance creation must be as fast as possible — all heavy computation 
belongs at engine compile time
   - `UnitProcessor` implementations (`JoinLeftInlet`, `JoinRightInlet`) are 
stateless — can be compiled once and shared across unit instances
   - `wireHead()` stays behind the seam as `BruteForceCompiledEngine` — tests 
remain green
   - All 103 existing tests must pass after refactor
   
   ## Out of scope
   
   - Router redesign (array-based dispatch) — part of the real Rete engine
   - `RuleNetworkMap` — part of the real Rete engine
   - `IncrementalReteEngine` — separate issue
   
   Refs #6639


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to