ringkernel-txmon
GPU-accelerated real-time transaction monitoring showcase for RingKernel.

Overview
TxMon demonstrates RingKernel's capabilities for high-throughput financial transaction monitoring, suitable for banking/AML compliance scenarios. It includes a transaction factory, compliance rule engine, and real-time GUI.
Features
- Transaction Factory: Configurable synthetic transaction generation with realistic patterns
- Compliance Rules: Velocity breach, amount threshold, structuring detection, geographic anomaly
- Real-time GUI: Live transaction feed, alerts panel, statistics dashboard
- Multi-backend: CPU and optional CUDA GPU acceleration
GPU Backend Approaches
The cuda module provides three different GPU-accelerated approaches:
1. Batch Kernel (High Throughput)
Each thread processes one transaction independently. Best for maximum throughput on large batches.
// ~93B elem/sec on RTX Ada
let alerts = batch_kernel.process.await?;
2. Ring Kernel (Actor-based Streaming)
Persistent GPU kernels with HLC timestamps and K2K messaging. Best for low-latency streaming with complex multi-stage pipelines.
let kernel = ring_kernel.launch.await?;
kernel.send.await?;
3. Stencil Kernel (Pattern Detection)
Uses GridPos for spatial pattern detection in transaction networks. Detects circular trading, velocity anomalies, and coordinated activity patterns.
let config = new
.with_tile_size;
let patterns = stencil_kernel.detect.await?;
Usage
use ;
// Create transaction generator
let config = GeneratorConfig ;
let generator = new;
// Create monitoring engine
let engine = new;
// Process transactions
for tx in generator.generate_batch
Alert Types
| Type | Description |
|---|---|
VelocityBreach |
Too many transactions in time window |
AmountThreshold |
Single transaction exceeds limit |
Structuring |
Pattern of transactions just below threshold |
GeographicAnomaly |
Unusual geographic pattern |
Run GUI
Benchmark
Typical results on RTX 4090:
| Operation | Throughput |
|---|---|
| Batch Kernel | ~93B elem/sec |
| Pattern Detection | ~15.7M TPS |
Testing
The crate includes 40+ tests covering transaction generation, rule evaluation, and GPU kernels.
License
Apache-2.0