Building the main exchange application
In this final section of the chapter, as well as the final section of the electronic trading exchange discussion, we will build the main exchange application. This will be a standalone binary application that will run an order gateway server, the matching engine, and the market data publisher and perform the following tasks:
- The order gateway server accepts client connections and client requests.
- The matching engine builds the limit order book.
- The matching engine also performs matching between client orders.
- The matching engine and the order gateway server publish client responses.
- The matching engine and the market data publisher publish incremental market data updates in response to client requests.
- The market data publisher also synthesizes and periodically publishes a full snapshot of the order book.
The complete design is presented in the following diagram.
Figure 7.4 –...