Score 1 billion rows with 30 rules in under 1 minute on a 50-worker Glue cluster. Drools DRL compatible. Runs on AWS Glue, Databricks, EMR, and Azure Synapse. Open source, Apache 2.0.
Every metric here comes from the Glue JobRun API and the benchmark summary JSON. Zero projections, zero marketing math.
Strategy A compiles your DRL rules to Spark SQL and runs them as JVM Catalyst bytecode via WholeStageCodegen - the same codepath Spark uses for native joins.
Add workers, get proportional throughput. Measured 3.28M rows/sec on 10 workers scales to ~32M rows/sec on 100 workers.
Drop-in DRL parser. Same syntax your auditors and regulators already know. Works with existing Drools rule packs.
Every rule fire has a reason code, salience, and deterministic output. Strategy classification proves which rules run as SQL vs Python.
AWS Glue, Databricks, EMR, Azure Synapse, GCP Dataproc. Any Spark 3.5+. Terraform module included for Glue.
Same rule pack for Kafka streaming and daily batch. Structured Streaming compatible. Iceberg sink for lakehouse integration.
Starter PyO3 crate at sparkrules_native. Not yet on PyPI. Current Tier-1 JSON-FFI interpreter measures ~1.1-1.3x vs Python local scorer. Active area of contribution.
On 25 × G.1X workers at $0.28. Projected from measured 10-worker baseline.
Spark's Catalyst optimizer fuses all 30 rule predicates into one WholeStageCodegen stage per partition.
Apache 2.0 open source. No per-DPU, per-rule, per-fact, or per-seat pricing.
Strategy A classifier identifies rules that translate cleanly to Spark SQL and compiles them to Catalyst expressions. These rules run as native JVM bytecode on Spark executors.
Project [t, r_r01_fare_zero_or_negative, r_r06_tip_negative, ..., r_r30_group_ride]
+- Project [
((t.fare_amount <= 0.0) <=> true) AS r_r01_fare_zero_or_negative,
((t.tip_amount < 0.0) <=> true) AS r_r06_tip_negative,
... 28 more rule predicates ...
]
+- Repartition 80
+- Relation [VendorID, tpep_pickup_datetime, ...] parquet
Linear scaling with Spark. Per-DPU pricing is identical across G.1X through G.8X - pick a worker type based on memory needs, not price.
Score every transaction against hundreds of rules. 500k TPS sustained on 2 G.1X workers. Real-time or batch.
Evaluate bid requests against targeting rules. 10M+ QPS on 50 G.2X workers. Same rule pack runs in Kafka streaming.
Every fire has a reason code and rule ID. Deterministic output across runs - a foundation for GxP audit trails, not a shipped GxP attestation.
Verizon-scale CDR streams at 250k events/sec. One G.1X handles it with 13x headroom.
Complex multi-fact rule packs with salience and action merging. Hot-swap rules without restart.
Rule-based data quality at lakehouse scale. Billions of rows per day in daily batch windows.
sparkrules ships working code for every feature - DRL rule files, Python scripts, Spark jobs, Jupyter notebooks. Plus a browser-based Workbench at /workbench/ that lets you author, validate, simulate, and promote rules without writing glue code.
Minimal, discount tier, credit underwriting, fraud detection, insurance claims. Sample facts included.
Adverse action, DMN, DQ profiling, OPA export, AI authoring, chaos harness, two-pass orchestrator.
V2 SparkRuleExecutor, lakehouse sinks, pure-Python row iterator. With --explain Catalyst printout.
Getting Started, Decision Tables, API & Simulation, Credit Underwriting, Fraud, Architecture, Databricks.
Start the API server and open /workbench/ - you get a full rule authoring IDE in the browser. No separate install, no third-party UI, no license key.
# 1. Install with API extras
pip install sparkrules[api]
# 2. Start the server
python -m uvicorn \
sparkrules.api.app:create_app \
--factory --port 8042
# 3. Open in browser
http://localhost:8042/workbench/
admin / admin - override via env vars for prod.
Available on PyPI today. Works on any Spark 3.5+ cluster. Terraform module for Glue included.
Default Python engine. Works everywhere. 4.2k rows/sec local, millions/sec on Spark.
Tier-1 PyO3 scorer with JSON FFI. Measured ~1.1-1.3x over Python local scorer. Not wired to Spark executors. See docs/NATIVE_TIER1.md.