Skip to content

Choosing an Evaluation Mode

Prerequisites: The FluxRules Engine.


FluxRules ships a single engine (PHREAK), so there is no engine to pick. The one decision you make is which evaluation mode fits your workload.

Decision flowchart

  1. Do you keep state between facts?
  2. No - each request is independent → Stateless mode (default)
  3. Yes - you assert/retract into a long-lived session → Streaming mode

  4. What is the evaluation pattern?

  5. Request-response (HTTP) → Stateless mode
  6. Batch (many independent facts) → Stateless mode
  7. Event stream where only changes matter → Streaming mode

  8. Do you need per-fact deltas?

  9. No, you want the full fired set every call → Stateless mode
  10. Yes, you want only what changed since the last fact → Streaming mode

Quick decision guide

Scenario Mode
HTTP API for fraud scoring Stateless
Batch data pipeline Stateless
Rules updated daily Stateless (reload rules)
Single-file rule config Stateless
Long-lived session with retractions Streaming
Event stream, deltas only Streaming

Default recommendation

Use stateless mode unless you specifically need persistent working memory:

  • Simplest deployment and reasoning (no state to manage)
  • Lowest memory footprint (nothing retained between calls)
  • Ideal for request-response and batch workloads

Enable streaming only when you need incremental deltas across a session.


Next Steps