One decision engine, many event streams.

BlazeRules runs YAML and SQL-style rules on incoming data from HTTP, stdin, file tails, Kafka, Arrow, Avro, Protobuf, S3/local files, and nested JSON or Arrow payloads. Each use case below shows where the engine sits, which operators matter, and what teams can route downstream.

httpHTTP / stdin / files
hubKafka / CDC events
datasetArrow / Avro / Protobuf
BLAZERULES DECISION LAYER
PROJECT WINDOW LOOKUP SCORE
APPROVE / ROUTE
REVIEW / SCORE
BLOCK / DLQ
Payments Fraud Authorization

Decide before the authorization path moves on.

A payment event carries amount, card, merchant, device, location, and history signals. BlazeRules can combine deterministic rules, velocity state, BIN/watchlist lookups, geo distance, and model scores into one batch decision.

Best first ingestion path
Kafka JSON/Avro/Protobuf or RuleEngine.evaluate_ndjson(...)
payment event
BlazeRules
approve / review / block
rules:
  - id: payment_high_risk
    decision: REVIEW
    score: 80
    when:
      and:
        - field: amount
          op: gt
          value: 2000
        - field: billing_country
          op: neq_field
          other_field: shipping_country
        - window: {field: card_token, func: count, duration: 30m}
          op: gte
          value: 4
        - field: merchant_bin
          op: in_lookup
          lookup: risky_bins
        - op: distance_gt
          lat_field: billing_lat
          lon_field: billing_lon
          other_lat_field: shipping_lat
          other_lon_field: shipping_lon
          value: 500
        - model_score: {model: fraud_v1}
          op: gt
          value: 0.72
Features
windowslookupsONNXcross-fieldgeo
Impact
  • Score and reason code in the authorization path.
  • Batch velocity without an external query service.
  • Grouped indices for bulk routing to review or block queues.
AML Transaction Monitoring

Turn noisy monitoring into compact review streams.

AML monitoring is often dominated by false positives and manual review. BlazeRules keeps deterministic watchlists, rolling sums, ratio windows, and temporal rules close to the transaction stream so candidate alerts are compact before analyst systems see them.

Best first ingestion path
Kafka transaction events plus S3/Arrow backtest files
transactions
rules + watchlists
review queue
rules:
  - id: aml_new_payee_burst
    decision: REVIEW
    risk_band: HIGH
    when:
      and:
        - field: counterparty_id
          op: in_lookup
          lookup: sanctions_watchlist
        - window: {field: customer_id, func: sum, metric: amount, duration: 24h}
          op: gt
          value: 50000
        - window: {field: customer_id, func: ratio, numerator: foreign_wire, denominator: all_wire, duration: 7d}
          op: gte
          value: 0.40
        - field: event_ts_ms
          op: time_of_day_between
          value: ["22:00", "06:00"]
Features
sumratiowatchliststemporal
Impact
  • Fewer low-signal alerts entering review.
  • Same YAML rules for stream and backtest runs.
  • Auditable reason codes and risk bands.
Security / SIEM Pre-Filtering

Reduce log volume before expensive indexing.

Security teams often pay to store and search every line, then fight alert fatigue. A local agent can accept HTTP logs, stdin, file tail, or Kubernetes container logs, apply regex/CIDR/temporal rules, and emit only compact detections plus DLQ rows.

Best first ingestion path
blazerules_agent --input http|stdin|file_tail
pod logs
local filter
SIEM + DLQ
rules:
  - id: suspicious_auth_log
    decision: REVIEW
    when:
      and:
        - field: message
          op: regex
          value: "(permission denied|token leak|sudo failure)"
        - field: source_ip
          op: ip_not_in_subnet
          value: "10.0.0.0/8"
        - field: service
          op: not_in_lookup
          lookup: service_allowlist
        - field: event_ts_ms
          op: time_of_day_between
          value: ["22:00", "06:00"]
Features
regexCIDRDLQlogs
Impact
  • Route high-value detections, not every log line.
  • Keep malformed records out of the hot path.
  • Observe source health from the dashboard.
Adtech Invalid Traffic / Pre-Bid Filtering

Filter bad traffic before bidding or attribution.

Invalid traffic rules depend on fast deterministic checks: user-agent patterns, device fingerprints, proxy ranges, publisher allowlists, and request flags. BlazeRules keeps those checks in the request stream and emits grouped decisions for downstream routing.

Best first ingestion path
Kafka/HTTP JSON or Protobuf request batches
bid request
traffic rules
suppress / route
rules:
  - id: invalid_traffic_prebid
    decision: BLOCK
    when:
      or:
        - field: user_agent
          op: regex
          value: "(bot|crawler|headless)"
        - field: device_fingerprint
          op: in_lookup
          lookup: bad_devices
        - field: source_ip
          op: ip_in_subnet
          value: "198.51.100.0/24"
        - field: signal_flags
          op: flags_any
          value: 12
Features
regexlookupCIDRflags
Impact
  • Suppress invalid requests early.
  • Protect attribution and inventory metrics.
  • Keep clean requests on the fast path.
Marketplace / E-Commerce Abuse

Evaluate cart, account, and device risk together.

Checkout and refund events are nested: items, promotions, merchant state, buyer history, and device data live in one payload. BlazeRules can use dotted fields and array_any without forcing users to flatten every item into a separate row.

Best first ingestion path
API batches or Kafka checkout/refund events
nested order
array_any rules
hold / review
rules:
  - id: refund_abuse_with_risky_item
    decision: REVIEW
    when:
      and:
        - field: account_age_days
          op: lt
          value: 7
        - array_any:
            path: items
            where:
              and:
                - field: price
                  op: gt
                  value: 250
                - field: category
                  op: in
                  values: ["electronics", "gift_card"]
        - window: {field: buyer_id, func: count, duration: 24h}
          op: gte
          value: 3
Features
nestedarray_anyvelocityONNX
Impact
  • Protect refund and promo flows.
  • Preserve one order as one decision record.
  • Route risky orders without extra ETL jobs.
Gaming / iGaming Abuse

Catch bonus, device, and withdrawal abuse in the session stream.

Gaming platforms see repeated entities, device clusters, bonus events, and withdrawal attempts. BlazeRules can combine velocity counters, entity keys, vector similarity, and fingerprint lookups before events hit manual review or payout systems.

Best first ingestion path
Session events via Kafka or the HTTP agent
session stream
entity state
throttle / block
rules:
  - id: bonus_cluster_abuse
    decision: THROTTLE
    when:
      and:
        - window: {field: player_id, func: count, duration: 1h}
          op: gte
          value: 8
        - field: device_fingerprint
          op: in_lookup
          lookup: banned_devices
        - vector_distance:
            dims: [emb_0, emb_1, emb_2]
            reference: [0.10, 0.20, 0.30]
            metric: cosine
          op: gt
          value: 0.92
Features
entity windowsvectorlookupcustom decisions
Impact
  • Throttle repeated abuse automatically.
  • Detect clustered device behavior.
  • Review withdrawals before payout.
IoT / Industrial Telemetry

Alert on abnormal telemetry at the edge.

Industrial telemetry creates constant high-volume readings. BlazeRules can run range checks, temporal windows, missing-value checks, model scores, and vector distance near the gateway so only meaningful anomalies move downstream.

Best first ingestion path
Protobuf/Arrow batches, gateway HTTP, or file tail at the edge
sensor readings
edge rules
alerts only
rules:
  - id: machine_anomaly_edge
    decision: ALERT
    when:
      or:
        - not:
            field: temperature_c
            op: between_including
            values: [5, 95]
        - field: pressure_psi
          op: is_null
        - window: {field: machine_id, func: avg, metric: vibration, duration: 10m}
          op: gt
          value: 0.70
        - model_score: {model: sensor_anomaly_v1}
          op: gt
          value: 0.80
Features
rangesnullsavg windowmodel_score
Impact
  • Reduce cloud telemetry volume.
  • Keep latency-sensitive alerts local.
  • Route bad or missing sensor payloads cleanly.
Capital Markets / Pre-Trade Risk

Reject unsafe orders before they hit the market path.

Pre-trade checks need fast account, symbol, price-band, size, and flag logic. BlazeRules is a good fit when an application already batches order events and needs deterministic allow/reject/review outputs in-process.

Best first ingestion path
Arrow or Protobuf order batches
order batch
risk checks
allow / reject
rules:
  - id: pre_trade_limit_check
    decision: REJECT
    when:
      or:
        - field: order_qty
          op: gt_field
          other_field: max_order_qty
        - field: order_price
          op: lt_field
          other_field: min_price
        - field: order_price
          op: gt_field
          other_field: max_price
        - field: symbol
          op: in_lookup
          lookup: restricted_symbols
        - field: account_flags
          op: flags_any
          value: 4
Features
cross-fieldrangeslookupsflags
Impact
  • Reject bad orders before downstream systems.
  • Keep policy in YAML instead of scattered callbacks.
  • Bulk-route rejects and exceptions by row index.
Offline Backtest / Candidate Rules

Replay history before changing production rules.

The same deterministic rules used online can run over local or S3-backed batches for fire-rate checks, candidate comparison, lookup/model validation, and dashboard review. Treat this as a release workflow around the local data plane.

Best first ingestion path
S3/local NDJSON, Arrow, and batch files
history
candidate rules
fire-rate report
rules:
  - id: candidate_high_risk_route
    enabled: true
    decision: REVIEW
    when:
      and:
        - field: merchant.risk.score
          op: gte
          value: 85
        - field: country_code
          op: not_in
          values: ["US", "CA", "GB"]
        - field: tags
          op: contains_any
          values: ["new_device", "new_payee"]
Features
S3/localnestedarraysdashboard
Impact
  • Estimate fire-rate movement before activation.
  • Validate lookups and model dependencies together.
  • Use dashboard panels for release review.

Feature-to-use-case map

The engine features are not abstract checkboxes. They remove specific work from real event pipelines.

FeaturePaymentsAMLSecurityAdtechMarketplaceGamingIoTCapital
Windows
Lookups
ONNX / model_score
Vector similarity
Regex / CIDR
Nested / array_any
Grouped routing / DLQ

Pick the first ingestion path that matches your data.

You haveUseBest for
NDJSON bytes or JSON logsevaluate_ndjson / agent HTTPpayments, security logs
PyArrow / Arrow batchesevaluate_batchpre-trade, backtests
Application logs over HTTPblazerules_agent --input httpSIEM filtering, request filtering
Terminal, stdout, stderrblazerules_agent --input stdinlocal log triage
Log files or pod logsblazerules_agent --input file_tailKubernetes / node-local logs
Kafka topicsblazerules_io consumer loopAML, gaming
Arrow IPC, Avro, Protobufblazerules_io decodersIoT, capital markets
S3 or local filesblazerules_io.read_*offline backtests, lookup/model/rule loading

Every decision path leaves an operations trail.

The local dashboard reads decision logs, DLQ logs, metrics, benchmark output, and rule summaries. It is an observability surface for decision behavior, not a hidden event processor.

timeline

Decision timeline

See decision rate, latency, and match-rate movement after a rollout.

format_list_numbered

Rule fire rates

Find which rules dominate review queues or block outcomes.

report

DLQ samples

Group malformed records by error code without flooding logs.

sensors

Source health

Inspect watched files, metrics URLs, freshness, and collector state.

leaderboard

Top winning rules

Track which rule IDs most often determine decisions.

compare_arrows

Backtest and release panels

Review candidate output, benchmark summaries, and rollout health.