This document provides a comprehensive analysis and audit of the Tardis Management Cluster (TMC) design compared to the existing Unicorn Binance Depth Cache Cluster (UBDCC) infrastructure.
| Attribute | UBDCC (Current) | TMC (Target Design) | Audit Note |
|---|---|---|---|
| Philosophy | "Deep & Narrow" (Binance Focused) | "Broad & Unified" (Multi-Exchange) | TMC inherits UBDCC's distributed maturity while expanding scope. |
| Design Pattern | Master-Worker-Proxy (Python/Cython) | Master-Worker-Proxy (Node.js/TS) | TMC adopts the same proven pattern but aligns with the Tardis ecosystem. |
| Control Plane | Python mgmt node |
Node.js master node |
Both use in-memory thread-safe state stores with replication. |
| Data Plane | unicorn-binance-local-depth-cache |
tardis-machine |
TMC leverages a more feature-rich, multi-exchange engine. |
- Strengths: Implements strict sequence ID validation (
u == prev_U + 1). Any gap triggers an immediate hard-reset of the cache. - Audit: Highly reliable for Binance. Its native integration with the Binance protocol ensures zero drift.
- Strengths: Normalized schema across 30+ exchanges. Built-in compression and caching for historical replay.
- Gaps (Fixed in TMC Design): Standard Tardis setups lack active drift detection. The TMC design "fills" this by adding the Consistency Validation Layer (Periodic REST snapshot audit), bringing it up to UBDCC's institutional standard.
- Audit: By porting UBDCC's "Sequence Gap" and "Drift Detection" logic into the Tardis engine, TMC achieves parity in data integrity while supporting a much broader market.
- UBDCC: Scales by spawning multiple DCN pods (one per core). Orchestration is K8s-native but Python-bound (GIL).
- TMC: Scales by spawning multiple Worker pods managing
tardis-machine. Node.js's non-blocking I/O is ideally suited for high-throughput WS proxying. - Audit: TMC's "Resource-Weighted" distribution (Event Loop Lag metrics) is a more modern approach to rebalancing than UBDCC's "Unused Longest" strategy.
- UBDCC: Cython-compiled modules provide high performance for Binance data.
- TMC:
tardis-machineis a highly optimized C++/JS engine capable of 100k+ msg/s. - Audit: TMC is expected to outperform UBDCC in multi-exchange scenarios due to the underlying engine's optimizations for high-density historical and real-time streams.
- UBDCC: Database is replicated to all nodes. On Master failure, any node can provide the state.
- TMC: Adopts the Circular Backup protocol from UBDCC. The
ClusterDBis replicated to allTMC-Workernodes. - Audit: Parity achieved. TMC's "Master Recovery" logic is a direct port of UBDCC's successful self-healing mechanism.
- UBDCC: Proxy retries different DCNs for the same market.
- TMC: Gateway implements Hot-Standby Redundancy (First-to-Arrive signals).
- Audit: TMC's failover logic is more advanced for trading, focusing on signal latency (picking the fastest stream) rather than just availability.
| Use Case | UBDCC | TMC |
|---|---|---|
| Live Binance Trading | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Multi-Exchange Research | ❌ | ⭐⭐⭐⭐⭐ |
| Historical Replay | ❌ | ⭐⭐⭐⭐⭐ |
| Ultra-Low Latency Streams | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Institutional Resilience | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
The TMC design is a successful institutional evolution of the UBDCC project. It preserves the distributed orchestration and self-healing reliability of UBDCC while leveraging the Tardis ecosystem to provide:
- Multi-exchange support (30+ vs 1).
- Unified Historical/Real-time access (Full parity for backtesting).
- Modernized Scaling (Event Loop metrics vs process-based).
- Enhanced Signal Integrity (Active auditing vs passive consumption).
Recommendation: Proceed with TMC implementation as it represents a significant upgrade in both capability and performance for institutional quant operations.