Data Flow
Tracera processes data through multiple pipelines, each optimized for its specific workload.Price Ingestion Pipeline
How it works
- Scheduler triggers a price fetch cycle at a configurable interval
- Providers are queried concurrently using goroutine fan-out with
sync.WaitGroup - Each provider returns normalized
RawPricestructs - Prices are batch-inserted into TimescaleDB using
pgx.CopyFromfor minimal DB round-trips - Latest prices are cached in Redis for instant reads
- Price updates are published to Redis Pub/Sub for real-time broadcasting
Provider Isolation
Each provider runs in its own goroutine. If one provider fails (network timeout, API error), other providers still complete their cycle. Failures are logged but don’t block the pipeline.Volatility Computation Pipeline
Real-Time Delivery Pipeline
- The WebSocket hub subscribes to Redis Pub/Sub channels
- When a price or volatility update is published, the hub receives it
- The hub fans out the update to all connected clients subscribed to that item
- Clients receive updates over persistent WebSocket connections — no polling