Interview: Eric Evans Interviews Greg Young on the Architecture of a Large Transaction System
In an interview published by InfoQ a couple of weeks ago, Eric Evans, the author of Domain Driven Design and playing the role of an interviewer for the first time, asks Greg Young about the architectural challenges encountered while designing and implementing a system used to process tens of thousands of transactions per second. It's not just the sheer number of transactions that is challenging, but the time constraints imposed are those specific to real-time systems.
The system collects real-time financial data coming from multiple stock markets as messages. The messages are processed and the resulting data is modeled and stored in the system's domain making it available for various analytic purposes like algorithmic trading or data analysis.
Some of the objects in the domain go through various state changes, and tracking those changes is vital for the application. All the domain objects are stored in various repositories, but the aggregate roots are responsible for handling state changes for the entire aggregate. The solution chosen was to work with state changes not the state itself, and the changes are propagated through a pipeline of messages. For example, when an order is created an order created message is dispatched and the order is stored into an order book. When someone trades with that order, the system receives a trade message, finds the respective order and removes some volume from it dispatching a separate message. When the order is empty, it is removed from the order book.
The 23 minutes long interview contains more architectural challenges and implementation details.
Domain and Architecture
Rafael Peixoto de Azevedo
I actually deeply thank you both.
The reported experience is very rich. The design solutions to address such challenges of speed, reliability and complexity are certainly useful in other design situations.
I am looking forward to learn more about this excellently done work.
Randy Shoup Jul 03, 2015