DocsArchitecture & Integration
Backend Data & Caching
Market Data Pipeline, Single-flight resolvers, and TTL caching strategies.
External financial data APIs are notoriously volatile. The Trentarev API server buffers the frontend from this reality via an internal Market Data Pipeline and an aggressive caching strategy.
Upstream Sources
- Alpha Vantage: Equity pricing & fundamentals.
- NewsAPI: Market sentiment & news.
- ExchangeRate-API: Forex parity values.
Caching Strategy
The core scalability paradigm is an aggressive, in-memory caching system using Single-Flight Resolvers. If multiple clients request the same un-cached endpoint simultaneously, they wait for a singular upstream "flight" to return.
- Snapshot Data: Cached for up to 30 minutes (market open) or 24 hours (market close).
- News Data: 15-minute tumbling window.
- Forex Translation: Fixed 24 hour TTL.