End-to-End Differential and Chaos Qualification Guide
NOTE
Verification Status: Verified against rekuiper and LF Edge eKuiper v2.4.1 cluster on 2026-09-30 18:49:09 UTC.
Scorecard: 154 / 154 Lifecycle and Chaos Scenarios Passed (100%). 12 / 12 SQL Formula Categories Verified under Live Stream Load (100% Exact Numerical Parity).
This guide documents the automated differential qualification harness. The harness verifies that rekuiper serves as an exact drop-in replacement for LF Edge eKuiper v2.4.1 across REST APIs, state persistence, error boundaries, streaming transformations, and mathematical calculations.
1. Differential Architecture
Differential testing runs both engines concurrently on an isolated bridge network with supporting edge infrastructure:
+------------------------+
| Mosquitto MQTT Broker |
| (:1883 TCP) |
+-----------+------------+
|
+--------------------+--------------------+
| Ingestion Topic: `devices/telemetry` |
v v
+-----------------------+ +-----------------------+
| rekuiper (Target) | | eKuiper 2.4.1 (Ref) |
| (:9081 HTTP REST) | | (:9091 HTTP REST) |
+-----------+-----------+ +-----------+-----------+
| |
| Sinks: `out/rekuiper/<rule_id>` | Sinks: `out/ekuiper/<rule_id>`
v v
+------------------------------------------------------+
| Differential Test Harness & Parity Ledger |
| - Exact payload comparison within 1e-3 epsilon |
| - Schema structural validation |
| - Performance, memory & crash resilience checks |
+------------------------------------------------------+2. Ingestion and Broker Configuration
In edge container topologies, both engines connect to external or shared brokers through confKeys.
Register a Broker Connection
# Register shared broker on rekuiper
curl -X PUT http://localhost:9081/metadata/sources/mqtt/confKeys/e2e_broker \
-H "Content-Type: application/json" \
-d '{"server": "tcp://kuiper-mosquitto:1883", "qos": 0}'Define a Stream with ConfKey
CREATE STREAM telemetry () WITH (
FORMAT = "json",
TYPE = "mqtt",
DATASOURCE = "devices/telemetry",
CONF_KEY = "e2e_broker"
);3. Verified Formula and Transformation Categories
During qualification, the test harness streamed 100 complex telemetry records simultaneously to both engines under load.
1. Mathematical Formulas and Precision
Both Go (float64) and Rust (f64) engines produce identical numerical results within $|v_1 - v_2| \le 10^{-3}$ epsilon:
SELECT
abs(vibe) AS v_abs,
ceil(temp) AS t_ceil,
floor(temp) AS t_floor,
round(temp, 1) AS t_round,
sqrt(abs(voltage)) AS v_sqrt,
power(voltage, 2) AS v_pow,
(voltage * current) AS power_calc,
round(sin(temp), 3) AS t_sin,
round(cos(temp), 3) AS t_cos,
round(ln(abs(voltage)), 3) AS v_ln,
round(exp(1.0), 3) AS e_const
FROM telemetry;2. String Manipulation
- Standard regex replacement:
regexp_replace(status, "ACTIVE", "RUNNING") - Native string replacement:
replace(status, "ACTIVE", "RUNNING")(rekuiper native optimization) - Transformations:
upper(),lower(),concat(),length(),trim(),ltrim(),rtrim()
3. Conditional Branching and Null Safety
SELECT
device_id,
CASE
WHEN temp > 35.0 THEN "CRITICAL"
WHEN temp > 22.0 THEN "WARNING"
ELSE "NORMAL"
END AS alert_level,
coalesce(nullable_val, -999) AS val_coalesce,
isNull(nullable_val) AS is_null_val
FROM telemetry;4. Deep JSON Paths and Array Subscripts
- Nested properties:
geo.lat,geo.lon,config.level - JSON path queries:
json_path_query(config, "$.mode") - Array operations:
readings[0],cardinality(readings),array_contains(readings, 20.0)
5. Stateful Window Aggregations
SELECT
count(*) AS win_cnt,
sum(temp) AS win_sum,
round(avg(temp), 2) AS win_avg,
min(temp) AS win_min,
max(temp) AS win_max
FROM telemetry
GROUP BY CountWindow(10);4. Chaos and Resilience Testing
The differential test harness executes targeted chaos injections to verify zero data loss:
- SIGKILL Crash Recovery: Kills the
rekuiperprocess during active stream execution. Upon restart, SQLite WAL recovery restores all stream and rule definitions without data loss. - Broker Partition and Egress Caching: Disconnects the Mosquitto broker while publishers continue sending data.
rekuiperbuffers events in memory and replays queued records upon reconnect. - Concurrent Mutation Flooding: Thirty concurrent threads issue rapid rule CRUD operations (
POST,PUT,DELETE). All operations serialize cleanly without deadlocks.
5. Execute Test Suites
Automated test suites reside in ekuiper/test/e2e_diff/:
# 1. Run complete 154-scenario REST lifecycle, chaos, and stress suite:
python3 test/e2e_diff/run_differential_tests.py
# 2. Run real telemetry stream processing and formula verification suite:
python3 test/e2e_diff/run_data_formula_tests.pyGenerated reports:
test/e2e_diff/QUALIFICATION_REPORT.mdtest/e2e_diff/DATA_AND_FORMULA_VERIFICATION_REPORT.md