How tzadiko/marketdatasimulator works
This is a simulated market-data order-book service with a console client. The user enters an instrument subscription; the client streams it to the server, which returns an initial snapshot and then incremental updates, rendered by the client. Server configuration creates per-instrument books, whose simulated updates feed the streaming service. The graph reflects sampled runtime code and the documented protocol; no README content or source for unsampled modules was available to verify further behavior.
Main entry points: OrderbookService.cs gRPC service · Orderbook.cs Simulated orderbook · Client.cs Client stream · Server.cs Orderbook manager
Components 17
Console Client
- Command loop
Client/Program.cs - Client stream
Common/Client/Client.cs
Market Server
- Server config
Server/Configuration/ServerConfiguration.cs - Server entry
Server/Program.cs - Orderbook manager
Server/Server.cs
Streaming Protocol
- gRPC service
Common/Server/OrderbookService.cs - Client stream state
Common/Server/ServerClient.cs - Protocol adapter
Common/Protos/Adapter.cs - Stream schema
Common/Protos/orderbook.proto
Orderbook Domain
- Simulated orderbook
Server/Orderbook.cs - Level comparer
Server/OrderbookLevelComparer.cs - Instrument settings
Common/Instrument.cs - Update models
Common/OrderbookUpdate.cs - Orderbook level
Common/OrderbookLevel.cs - Manager contract
Common/IOrderbookManager.cs
Other components
- Terminal user
- gRPC network
Connections 25
- Terminal user → Command loop: enters commands
- Command loop → Client stream: calls subscribe
- Server entry → Server config: loads settings
- Server entry → Orderbook manager: starts server
- Server config → Orderbook manager: configures books
- Orderbook manager → gRPC service: creates service
- Orderbook manager → Simulated orderbook: creates books
- Orderbook manager → Manager contract: implements
- Simulated orderbook → Instrument settings: uses specifications
- Simulated orderbook → Level comparer: sorts levels
- Simulated orderbook → gRPC service: publishes updates
- Simulated orderbook → Update models: builds updates
- Simulated orderbook → Orderbook level: maintains levels
- gRPC service → Manager contract: requests snapshots
- gRPC service → Client stream state: tracks and sends
- gRPC service → Update models: queues updates
- Client stream state → Protocol adapter: encodes levels
- Client stream → Protocol adapter: decodes updates
- Client stream → gRPC network: streams requests
- gRPC network → gRPC service: dispatches stream
- gRPC service → gRPC network: streams responses
- Client stream → Stream schema: uses schema
- gRPC service → Stream schema: implements schema
- Protocol adapter → Stream schema: maps messages
- Client stream → Command loop: prints updates