Replymessage unavailable
Ссылка
click to show
click to show
Algo Brain Workflow
Gambaran Alur:
1. Binance WS → Node Collector
Node.js buka WebSocket → terima tick → stream event ke NATS.
2. NATS
Semua tick masuk ke message subject, misal: ticks.BTCUSDT, ticks.ETHUSDT, dll.
3. Workers
Bisa banyak. Contoh:
Worker A (Python): hitung top 10 gainers.
Worker B (Node): hitung VWAP, MA, RSI, dsb.
Worker C (Python): maintain orderbook depth.
Worker D (Node): tulis ke Redis.
Semua ini jalan paralel dan subscribe ke data yang sama di NATS.
4. Redis
Redis hanya jadi hot cache untuk:
top-K
latest price
short history
aggregated data
Frontend tinggal baca dari Redis → no heavy calc.
5. Frontend (HTMX, Alpine, Preact)
Frontend panggil API kecil ke Express (misal /api/top10, /api/ticker) → ambil data dari Redis.
Desain super ringan, super cepat, dan scalable
NATS
https://nats.io
Connective Technology for Adaptive Edge & Distributed Systems