Summary
This chapter was dedicated to building the order gateway server and the market data publisher components. We also combined the matching engine component we built in the previous chapter with the order gateway server and market data publisher components we built in this chapter to build the final trading exchange main application.
First, we defined the public market data protocol that will be used by the exchange to publish data on the wire and used by the clients to write market data consumer applications. We performed a similar task with the order gateway protocol so that client applications can understand the format of the client requests that they send to the exchange’s order gateway server and receive responses from.
We built the order gateway server, whose design we established in the Designing Our Trading Ecosystem chapter. We built the OrderServer
class, which builds and runs TCPServer
, to accept and manage TCP client connections. We added functionality...