traqq
A high-performance event processing system that transforms JSON events into optimized Redis commands for real-time analytics, enabling complex queries without post-processing.
Performance Highlights
PC: Apple M2 Max 2023 64GB
- Processing Speed: 40,000+ events/second on a single thread
- Memory Efficient: ~6.7MB for 5000 test events
- Concurrent Support: Multi-threaded event processing
- Scaling Performance:
- Level 1: ~19,685 events/sec
- Level 5: ~11,214 events/sec
- Level 10: ~7,543 events/sec
- Level 20: ~4,343 events/sec
Quick Start
See main.rs for a basic usage demonstration.
use *;
let config = default;
let event = from_json.unwrap;
match from_incoming
Installation
[]
= "0.1.3"
# run unit tests
# run tests w benchmarking output
# run example
Core Features
1. Configuration System
TraqqConfig
2. Event Processing Pipeline
- Event Ingestion
- Sanitization
- Property Extraction
- Metric Generation
- Redis Command Generation
3. Redis Integration
Key Structure
<metric_type>:<bucket_type>:<timestamp>:<pattern>:<values>
Example Commands
PFADD bmp:d:1696118400:ip 127.0.0.1
INCR add:d:1696118400:event:purchase
INCRBY adv:d:1696118400:amount:event:purchase 99.99
Components
- Core Types:
TraqqConfig
,IncomingEvent
,ProcessedEvent
,RedisCommand
,RedisCommandType
- Utility Modules:
constants.rs
,utils.rs
Development Status
Implemented
- Event parsing and validation
- Property sanitization
- Compound key generation
- Metric generation
- Concurrent processing
- Performance benchmarking
Planned
- Redis command preparation
- Redis pipeline execution
- Redis query interface
- WebAssembly module
- Command line interface
- Additional storage adapter support
License
MIT