Backend Architecture
Course: Building an Exchange - Part 2 (Backend) - chapter 3
We have the following services -
- API - An API Server the user sends HTTP requests to
- Engine - Runs various market orderbooks, stores user balances in memory
- Websocket - Websocket server that user subscribes to real time events from
- DB Processor - Processes messages from the
**Engine**and persists them in the DB - Frontend - NextJS app (same as last week, only the URLs would change)
- Market maker (mm) - Places random orders to keep the book liquid
- Redis - Queue and pub sub
- TimescaleDB - Creates buckets of klines based on price feed
There should ideally be a primary database like postgres as well that stores user info/orders/trades etc.
